Skip to content

Commit 40f72f7

Browse files
authored
test(spanner): deflake R/W transaction test with in-memory harness test for omni (#13514)
1 parent edc41b9 commit 40f72f7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

java-spanner/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LocationAwareSharedBackendReplicaHarnessTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,11 @@ public void readWriteTransactionAbortedCommitUsesReadAffinityReplicaForBypassTra
398398
});
399399

400400
assertEquals(2, attempts.get());
401-
assertEquals(1, firstReplicaIndex.get());
401+
assertNotEquals(
402+
"Expected read-write transaction read to route to a bypass replica.\n"
403+
+ routingDiagnostics(harness),
404+
-1,
405+
firstReplicaIndex.get());
402406
int secondReplicaIndex = 1 - firstReplicaIndex.get();
403407
assertEquals(
404408
2,

0 commit comments

Comments
 (0)