Skip to content

Commit 9903cda

Browse files
Address review comments
1 parent 04cb76e commit 9903cda

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,14 @@ public void TestRetryInfo() {
6060
TransactionContext transaction2 = transactionManager2.begin();
6161
transaction1.executeUpdate(Statement.of("UPDATE Test SET EMPID = EMPID + 1 WHERE ID = 1"));
6262
transaction2.executeUpdate(Statement.of("UPDATE Test SET EMPID = EMPID + 1 WHERE ID = 1"));
63-
transactionManager1.commit();
63+
6464
AbortedException abortedException =
65-
Assert.assertThrows(AbortedException.class, transactionManager2::commit);
65+
Assert.assertThrows(
66+
AbortedException.class,
67+
() -> {
68+
transactionManager1.commit();
69+
transactionManager2.commit();
70+
});
6671
assertThat(abortedException.getErrorCode()).isEqualTo(ErrorCode.ABORTED);
6772
assertTrue(abortedException.getRetryDelayInMillis() > 0);
6873
}

0 commit comments

Comments
 (0)