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

[Bug]: Flaky test org.apache.beam.sdk.io.gcp.spanner.SpannerIOWriteExceptionHandlingTest.testExceptionHandlingForWriteGrouped #21729

Closed
nielm opened this issue Jun 7, 2022 · 3 comments · Fixed by #22023

Comments

@nielm
Copy link
Contributor

nielm commented Jun 7, 2022

What happened?

The test org.apache.beam.sdk.io.gcp.spanner.SpannerIOWriteExceptionHandlingTest.testExceptionHandlingForWriteGrouped
(SpannerIOWriteExceptionHandlingTest.java:222) seems to be flaky as a sleeper can be fired more or less times than what is required (I have seen errors with both 8 and 10 times instead of the required 9)

> is a org.mockito.exceptions.verification.TooManyActualInvocations
Stacktrace was: org.mockito.exceptions.verification.TooManyActualInvocations: 
sleeper.sleep(<any long>);
Wanted 9 times:
-> at org.apache.beam.sdk.io.gcp.spanner.SpannerIOWriteExceptionHandlingTest.testExceptionHandlingForWriteGrouped(SpannerIOWriteExceptionHandlingTest.java:222)
But was 10 times:

Issue Priority

Priority: 2

Issue Component

Component: io-java-gcp

@Abacn
Copy link
Contributor

Abacn commented Jun 23, 2022

Comment in SpannerIOWriteExceptionHandlingTest says "The default backoff generates about 9 retries, and then errors out the pipeline." This is not always true. FluentBackoff has randomOffset and it may turned out to generate 8 or 10 retries, with total sleep time equals to the max cumulative time (15 min). This makes the tests having a certain probability to fail.

@Abacn
Copy link
Contributor

Abacn commented Jun 23, 2022

.take-issue

@Abacn Abacn mentioned this issue Jun 23, 2022
4 tasks
@Abacn Abacn removed their assignment Jun 24, 2022
@Abacn
Copy link
Contributor

Abacn commented Jun 24, 2022

duplicates #22008 and there is another solution there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants