Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: increasing timeout in testOnResponseError #2291

Merged
merged 1 commit into from
Dec 13, 2023
Merged

test: increasing timeout in testOnResponseError #2291

merged 1 commit into from
Dec 13, 2023

Conversation

suztomo
Copy link
Member

@suztomo suztomo commented Dec 7, 2023

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 as a code owner 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
Copy link

sonarcloud bot commented Dec 7, 2023

[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

Copy link

sonarcloud bot commented Dec 7, 2023

[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

Copy link
Contributor

@lqiu96 lqiu96 left a comment

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.

@suztomo suztomo merged commit 087253a into main Dec 13, 2023
36 checks passed
@suztomo suztomo deleted the i1675_log branch December 13, 2023 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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