jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [1/3] jena git commit: Add more txn lifecycle tests
Date Thu, 24 Sep 2015 14:09:38 GMT
Repository: jena
Updated Branches:
  refs/heads/master 4e5543153 -> 95f56277a


Add more txn lifecycle tests


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/204de66d
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/204de66d
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/204de66d

Branch: refs/heads/master
Commit: 204de66d540b8f22158fc267d38ebd5c51d24d1d
Parents: 4e55431
Author: Andy Seaborne <andy@apache.org>
Authored: Thu Sep 24 14:53:43 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Thu Sep 24 14:53:43 2015 +0100

----------------------------------------------------------------------
 .../transaction/AbstractTestTransaction.java     | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/204de66d/jena-arq/src/test/java/org/apache/jena/sparql/transaction/AbstractTestTransaction.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/transaction/AbstractTestTransaction.java
b/jena-arq/src/test/java/org/apache/jena/sparql/transaction/AbstractTestTransaction.java
index c64262a..b41824b 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/transaction/AbstractTestTransaction.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/transaction/AbstractTestTransaction.java
@@ -131,7 +131,24 @@ public abstract class AbstractTestTransaction extends BaseTest
         write(ds) ;
         read2(ds) ;
     }
-
+    
+    // Cycle misalignment.
+    // test : commit
+    // test : abort
+    // Permit explain .end() - the case of "end" when not sure:  begin...end.end. 
+    
+    @Test(expected=JenaTransactionException.class)
+    public void transaction_err_nontxn_commit()    { 
+        Dataset ds = create() ;
+        ds.commit() ;
+    }    
+    
+    @Test(expected=JenaTransactionException.class)
+    public void transaction_err_nontxn_abort()    { 
+        Dataset ds = create() ;
+        ds.abort() ;
+    }    
+    
     @Test
     public void transaction_err_01()    { testBeginBegin(WRITE, WRITE) ; }
 


Mime
View raw message