Skip to content

test: increasing timeout in testOnResponseError#2291

Merged
suztomo merged 1 commit intomainfrom
i1675_log
Dec 13, 2023
Merged

test: increasing timeout in testOnResponseError#2291
suztomo merged 1 commit intomainfrom
i1675_log

Conversation

@suztomo
Copy link
Copy Markdown
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 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
Copy link
Copy Markdown

sonarqubecloud 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

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud 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
Copy Markdown
Member

@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.

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