GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Client library tests taking too long to complete · Issue #309 · googleapis/java-pubsub

This repository was archived by the owner on Aug 13, 2026. It is now read-only.
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

Client library tests taking too long to complete #309

Copy link
Copy link
Closed
#310
Closed
Client library tests taking too long to complete#309
#310
Copy link
Assignees
hannahrogers-google
Labels
api: pubsubIssues related to the googleapis/java-pubsub API.type: processA process-related concern. May include testing, release, or the like.

Description

@hannahrogers-google
hannahrogers-google
opened on Aug 6, 2020
Issue body actions

The client library tests are taking a long time to complete - a Kokoro Integration Test timed out when running the presubmit checks before submitting a PR. The tests did not always take this long to complete, we should look into this.

Activity

  1. product-auto-label
    added
    api: pubsubIssues related to the googleapis/java-pubsub API.
    on Aug 6, 2020
  2. hannahrogers-google
    self-assigned this
    on Aug 6, 2020
  3. hannahrogers-google
    added
    type: processA process-related concern. May include testing, release, or the like.
    on Aug 6, 2020
  4. hannahrogers-google commented on Aug 6, 2020

    @hannahrogers-google
    hannahrogers-google
    on Aug 6, 2020
    ContributorAuthor
    More actions

    I manually ran the tests, and it took 5 minutes, 27 seconds for the test suite to complete. Most of the tests took less than a second, while the PublisherImplTest took over 5 minutes.

  5. hannahrogers-google commented on Aug 6, 2020

    @hannahrogers-google
    hannahrogers-google
    on Aug 6, 2020
    ContributorAuthor
    More actions

    In the PublisherImplTest, after calling shutdown on the publisher, we wait up to a minute for the publisher to terminate. It looks like we always wait the full 60 seconds and the publisher never terminates, which is why the test is taking so long.

  6. hannahrogers-google commented on Aug 6, 2020

    @hannahrogers-google
    hannahrogers-google
    on Aug 6, 2020
    ContributorAuthor
    More actions

    It looks like the executor is not being shutdown properly - We are using a FakeScheduledExecutor for most of the tests, and it looks like we have outstanding scheduled fixed executor calls that never complete because we do not 'advance time'. We actually do not schedule anything at a fixed rate on the publisher executor inside our own client library - this is likely coming form the gax/grpc layer.

  7. hannahrogers-google commented on Aug 6, 2020

    @hannahrogers-google
    hannahrogers-google
    on Aug 6, 2020
    ContributorAuthor
    More actions

    We are also not handling channel shutdowns properly - the following is being logged during the publisher tests:

    SEVERE: ~* Channel ManagedChannelImpl{logId=340, target=directaddress:///test-server} was not shutdown properly!!! *~
    Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.

  8. hannahrogers-google commented on Aug 6, 2020

    @hannahrogers-google
    hannahrogers-google
    on Aug 6, 2020
    ContributorAuthor
    More actions

    Gax implements a Watchdog (https://github.com/googleapis/gax-java/blob/master/gax/src/main/java/com/google/api/gax/rpc/Watchdog.java) that periodically garbage collects idle streams. The check is scheduled at a fixed rate every 10 seconds.

    In our publisher test, after we shutdown the executor we should advance time by 10 seconds to ensure all scheduled callables complete.

  9. hannahrogers-google commented on Aug 20, 2020

    @hannahrogers-google
    hannahrogers-google
    on Aug 20, 2020
    ContributorAuthor
    More actions

    The pending fix reduces test time from >5 minutes, to <30 seconds.

  10. hannahrogers-google
    closed this as completedin #310on Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @hannahrogers-google
    hannahrogers-google

Labels

api: pubsubIssues related to the googleapis/java-pubsub API.type: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.