use of org.apache.jena.sparql.JenaTransactionException in project jena by apache.
the class AbstractTestTransactionLifecycle method testAbortCommit.
private void testAbortCommit(TxnType txnType) {
assumeTrue(supportsAbort());
Dataset ds = create();
ds.begin(txnType);
ds.abort();
try {
ds.commit();
fail("Expected transaction exception - abort-commit(" + txnType + ")");
} catch (JenaTransactionException ex) {
safeEnd(ds);
}
}
use of org.apache.jena.sparql.JenaTransactionException in project jena by apache.
the class AbstractTestTransactionLifecycle method testBeginBegin.
// Error conditions that should be detected.
private void testBeginBegin(TxnType txnType1, TxnType txnType2) {
Dataset ds = create();
ds.begin(txnType1);
try {
ds.begin(txnType2);
fail("Expected transaction exception - begin-begin (" + txnType1 + ", " + txnType2 + ")");
} catch (JenaTransactionException ex) {
safeEnd(ds);
}
}
use of org.apache.jena.sparql.JenaTransactionException in project jena by apache.
the class AbstractTestTransactionLifecycle method testCommitAbort.
private void testCommitAbort(TxnType txnType) {
assumeTrue(supportsAbort());
Dataset ds = create();
ds.begin(txnType);
ds.commit();
try {
ds.abort();
fail("Expected transaction exception - commit-abort(" + txnType + ")");
} catch (JenaTransactionException ex) {
safeEnd(ds);
}
}
use of org.apache.jena.sparql.JenaTransactionException in project jena by apache.
the class AbstractTestTransactionLifecycle method testCommitCommit.
private void testCommitCommit(TxnType txnType) {
Dataset ds = create();
ds.begin(txnType);
ds.commit();
try {
ds.commit();
fail("Expected transaction exception - commit-commit(" + txnType + ")");
} catch (JenaTransactionException ex) {
safeEnd(ds);
}
}
use of org.apache.jena.sparql.JenaTransactionException in project jena by apache.
the class AbstractTestTransactionLifecycle method testAbortAbort.
private void testAbortAbort(TxnType txnType) {
assumeTrue(supportsAbort());
Dataset ds = create();
ds.begin(txnType);
ds.abort();
try {
ds.abort();
fail("Expected transaction exception - abort-abort(" + txnType + ")");
} catch (JenaTransactionException ex) {
ds.end();
}
}
Aggregations