Skip to content

Commit 4035c84

Browse files
committed
chore(spanner): add test comments
1 parent 64a2e56 commit 4035c84

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,9 @@ public void inlineBegin() {
365365
}
366366
}
367367

368+
// This test ensures that when a transaction is aborted in a multiplexed session,
369+
// the transaction ID of the aborted transaction is saved during the retry when a new transaction
370+
// is created.
368371
@Test
369372
public void storePreviousTxnIdOnAbortForMultiplexedSession() {
370373
txn = Mockito.mock(TransactionRunnerImpl.TransactionContextImpl.class);
@@ -385,6 +388,9 @@ public void storePreviousTxnIdOnAbortForMultiplexedSession() {
385388
assertThat(manager.getState()).isEqualTo(TransactionState.STARTED);
386389
}
387390

391+
// This test ensures that when a transaction is aborted in a regular session,
392+
// the transaction ID of the aborted transaction is not saved during the retry when a new
393+
// transaction is created.
388394
@Test
389395
public void skipTxnIdStorageOnAbortForRegularSession() {
390396
txn = Mockito.mock(TransactionRunnerImpl.TransactionContextImpl.class);

0 commit comments

Comments
 (0)