Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.

test: increasing timeout in testOnResponseError - #2291

Merged
suztomo merged 1 commit into
mainfrom
i1675_log
Dec 13, 2023
Merged

suztomo merged 1 commit into
mainfrom
i1675_log

Conversation

@suztomo

@suztomo suztomo commented Dec 7, 2023 •

Copy link
Copy Markdown
Member

Fixes #1675

(This test is multithread because RetryingServerStreamingCallable uses an executor.)

This change increases the timeout in HttpJsonDirectServerStreamingCallableTest.testOnResponseError to avoid flakiness. There's no guarantee that this multithread test executes the CountDownLatch.countDown() within 2 seconds.

Will this 60-second timeout make the test execution slower? => No, it won't. CountDownLatch.await(timeout) returns immediately when the count becomes zero, without waiting for timeout.

image

In b/281936326, Lawrence tried to reproduce the issue in Windows, but it didn't. I think the best way is to increase timeout and observe any recurrence.

This test is multithread because RetryingServerStreamingCallable
uses an executor.

This change increases the timeout in
HttpJsonDirectServerStreamingCallableTest.testOnResponseError
to avoid flakiness. There's no guarantee that this multithread
test executes the CountDownLatch.countDown() within 2 seconds.
@suztomo
suztomo requested a review from a team December 7, 2023 16:08
@product-auto-label product-auto-label Bot added the size: xs Pull request size is extra small. label Dec 7, 2023
@suztomo
suztomo requested review from blakeli0 and lqiu96 December 7, 2023 16:12
@sonarqubecloud

sonarqubecloud Bot commented Dec 7, 2023

Copy link
Copy Markdown

[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud

sonarqubecloud Bot commented Dec 7, 2023

Copy link
Copy Markdown

[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lqiu96 lqiu96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I've tried replicated this many times before and wasn't able to. Most likely due to the CI utilizing a machine with less cores. Increasing the wait time 2s -> 60s should resolve the flakiness and we can revisit if flakes again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gax-java(windows): Flaky HttpJsonDirectServerStreamingCallableTest.testOnResponseError

2 participants