@Test
public void trans_readBlock_05()
{
// READ(block)-WRITE(commit)-WRITE(abort)-WRITE(commit)-READ(close)-check
StoreConnection sConn = getStoreConnection() ;
DatasetGraphTxn dsgR1 = sConn.begin(ReadWrite.READ) ;
DatasetGraphTxn dsgW1 = sConn.begin(ReadWrite.WRITE) ;
dsgW1.add(q1) ;
dsgW1.commit() ;
dsgW1.end() ;
assertFalse(dsgR1.contains(q1)) ;
DatasetGraphTxn dsgW2 = sConn.begin(ReadWrite.WRITE) ;
dsgW2.add(q2) ;
dsgW2.abort() ; // ABORT
dsgW2.end() ;
assertFalse(dsgR1.contains(q2)) ;
DatasetGraphTxn dsgW3 = sConn.begin(ReadWrite.WRITE) ;
dsgW3.add(q3) ;
// Can see W1
assertTrue(dsgW3.contains(q1)) ;
assertFalse(dsgW3.contains(q2)) ;
dsgW3.commit() ;
dsgW3.end() ;
assertFalse(dsgR1.contains(q3)) ;
dsgR1.end() ;
DatasetGraph dsg = sConn.getBaseDataset() ;
assertTrue(dsg.contains(q1)) ;
assertFalse(dsg.contains(q2)) ;
assertTrue(dsg.contains(q3)) ;
}