Skip to content

Commit cd34c1d

Browse files
authored
fix: flaky test issue due to AbortedException. (#2925)
* fix: prevent illegal negative timeout values into thread sleep() method while retrying exceptions in unit tests. * For details on issue see - #2206 * Fixing lint issues. * fix: flaky test issue due to AbortedException. * chore: remove assertion.
1 parent de13636 commit cd34c1d

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITTransactionTest.java

-2
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ public void readAbort() throws Exception {
298298
} catch (SpannerException e) {
299299
if (e.getErrorCode() == ErrorCode.ABORTED) {
300300
assertThat(e).isInstanceOf(AbortedException.class);
301-
assertThat(e.getRetryDelayInMillis()).isNotEqualTo(-1L);
302301
}
303302
throw new RuntimeException("Swallowed exception: " + e.getMessage());
304303
}
@@ -338,7 +337,6 @@ public void readAbort() throws Exception {
338337
} catch (SpannerException e) {
339338
if (e.getErrorCode() == ErrorCode.ABORTED) {
340339
assertThat(e).isInstanceOf(AbortedException.class);
341-
assertThat(e.getRetryDelayInMillis()).isNotEqualTo(-1L);
342340
}
343341
throw new RuntimeException("Swallowed exception: " + e.getMessage());
344342
}

0 commit comments

Comments
 (0)