Skip to content

[java-pubsub] PublisherImplTest is timing out #13051

Closed

Description

@hannahrogers-google

I have temporarily disabled these tests causing the timeouts (testResumePublish and testPublishThrowExceptionForUnsubmittedOrderingKeyMessage), but we should investigate these failures and re-enable these tests once we have root caused the issue.

Activity

  1. michaelpri10 commented on May 13, 2024

    @michaelpri10
    Contributor

    Running the PublisherImplTest with these tests re-enabled is passing but I do see occasional issues where the runtime of the test is >500 seconds when doing mvn clean install or mvn clean -Dtest=com.google.cloud.pubsub.v1.PublisherImplTest test, although it still passes.

    Only re-enabling testResumePublish keeps the runtime to ~12 seconds as well, but the longer time occurs when only testPublishThrowExceptionForUnsubmittedOrderingKeyMessage is re-enabled.

    The delay threshold for the Publisher batching settings is 500 seconds and reducing this causes the tests to pass faster.

    We expect that when the 4th message is published, we should pass this check and set the result for the message immediately, however from adding some extra logging, the error is not always set on the sequential executor in time.

    Adding an fakeExecutor.advanceTime(Duration.ZERO) call to force scheduled work to be executed fixes this issue and causes the aforementioned check to pass. My testing consisted of running the test 10 times, without this added line, I saw this error occur 4/10 times, but with this line it did not occur at all. I will upload a PR with this fix.

  2. added
    priority: p3Desirable enhancement or fix. May not be included in next release.
    on Jul 8, 2024
  3. added
    type: processA process-related concern. May include testing, release, or the like.
    on Oct 31, 2025
  4. changed the title [-]PublisherImplTest is timing out[/-] [+][java-pubsub] PublisherImplTest is timing out[/+] on May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.priority: p3Desirable enhancement or fix. May not be included in next release.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