Aklakan commented on code in PR #3027:
URL: https://github.com/apache/jena/pull/3027#discussion_r2081562774
##########
jena-arq/src/test/java/org/apache/jena/system/TestTxn.java:
##########
@@ -378,41 +379,67 @@ public void txn_threaded_01() {
@Test
public void txn_threaded_02() {
//Transactional tx = DatasetGraphFactory.createTxnMem();
- Transactional tx = counter;
-
+ Transactional tx = counter;
+
// Start and enter the W transaction.
ThreadAction a = ThreadTxn.threadTxnWrite(tx, ()->{});
// ThreadAction started ... in W transaction.
Txn.exec(tx, TxnType.READ_PROMOTE, ()->{
// ... have the thread action complete.
- a.run();
+ a.run();
// Blocks promotion.
boolean b = tx.promote();
assertFalse(b);
assertEquals(ReadWrite.READ, tx.transactionMode());
});
}
-
+
@Test
public void txn_threaded_03() {
Transactional tx = DatasetGraphFactory.createTxnMem();
- //Transactional tx = counter;
-
+ //Transactional tx = counter;
+
// Start and enter the W transaction.
ThreadAction a = ThreadTxn.threadTxnWriteAbort(tx, ()->{});
// ThreadAction started ... in W transaction.
Txn.exec(tx, TxnType.READ_PROMOTE, ()->{
// ... have the thread action abort..
- a.run();
+ a.run();
// Does not block promotion.
boolean b = tx.promote();
assertTrue(b);
assertEquals(ReadWrite.WRITE, tx.transactionMode());
});
}
+ @Test public void txn_ctl_write_01() {
Review Comment:
yes, these are leftovers i need to clean up. Initially I used the name
TxnCtl but then renamed it to AutoTxn.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]