if (!DbCompat.NESTED_TRANSACTIONS) {
return;
}
assertNull(currentTxn.getTransaction());
Transaction txn1 = currentTxn.beginTransaction(null);
assertNotNull(txn1);
assertTrue(txn1 == currentTxn.getTransaction());
assertNull(map.get(ONE));
assertNull(map.put(ONE, ONE));
assertEquals(ONE, map.get(ONE));
Transaction txn2 = currentTxn.beginTransaction(null);
assertNotNull(txn2);
assertTrue(txn2 == currentTxn.getTransaction());
assertTrue(txn1 != txn2);
assertNull(map.put(TWO, TWO));
assertEquals(TWO, map.get(TWO));
Transaction txn3 = currentTxn.beginTransaction(null);
assertNotNull(txn3);
assertTrue(txn3 == currentTxn.getTransaction());
assertTrue(txn1 != txn2);
assertTrue(txn1 != txn3);
assertTrue(txn2 != txn3);
assertNull(map.put(THREE, THREE));
assertEquals(THREE, map.get(THREE));
Transaction txn = currentTxn.abortTransaction();
assertTrue(txn == txn2);
assertTrue(txn == currentTxn.getTransaction());
assertNull(map.get(THREE));
assertEquals(TWO, map.get(TWO));