File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
google-cloud-spanner/src/test/java/com/google/cloud/spanner Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments