jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [054/100] [abbrv] jena git commit: JENA-1397: Rename java packages
Date Thu, 28 Sep 2017 16:06:06 GMT
http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TS_SolverTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TS_SolverTDB.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TS_SolverTDB.java
deleted file mode 100644
index 89333d6..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TS_SolverTDB.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.solver;
-
-import org.junit.runner.RunWith ;
-import org.junit.runners.Suite ;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses( {
-    TestSolverTDB.class     // Tests the TDB connectivity
-    , TestStats.class
-})
-
-public class TS_SolverTDB
-{}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TestSolverTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TestSolverTDB.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TestSolverTDB.java
deleted file mode 100644
index 8bfed60..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TestSolverTDB.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.solver;
-
-
-import java.util.ArrayList ;
-import java.util.Iterator ;
-import java.util.List ;
-
-import static org.junit.Assert.*;
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.graph.Triple ;
-import org.apache.jena.query.* ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.shared.PrefixMapping ;
-import org.apache.jena.shared.impl.PrefixMappingImpl ;
-import org.apache.jena.sparql.algebra.Algebra ;
-import org.apache.jena.sparql.algebra.Op ;
-import org.apache.jena.sparql.algebra.OpVars ;
-import org.apache.jena.sparql.core.Var ;
-import org.apache.jena.sparql.engine.QueryIterator ;
-import org.apache.jena.sparql.engine.binding.Binding ;
-import org.apache.jena.sparql.resultset.ResultSetCompare ;
-import org.apache.jena.sparql.sse.SSE ;
-import org.junit.AfterClass ;
-import org.junit.BeforeClass ;
-import org.junit.Test ;
-import org.seaborne.tdb2.ConfigTest ;
-import org.seaborne.tdb2.junit.TL ;
-
-public class TestSolverTDB
-{
-    static String graphData = null ;
-    static Graph graph = null ;
-    static Dataset dataset = null ;
-    static PrefixMapping pmap = null ;
-
-    @BeforeClass static public void beforeClass()
-    { 
-        dataset = TL.createTestDatasetMem() ;
-        dataset.begin(ReadWrite.WRITE);
-        graphData = ConfigTest.getTestingDataRoot()+"/Data/solver-data.ttl" ;
-        RDFDataMgr.read(dataset, graphData) ;
-        graph = dataset.asDatasetGraph().getDefaultGraph() ;
-        pmap = new PrefixMappingImpl() ;
-        pmap.setNsPrefix("", "http://example/") ;
-    }
-    
-    
-    @AfterClass static public void afterClass() {
-        dataset.abort();
-        TL.expel(dataset);
-    }
-            
-    static private void addAll(Graph srcGraph, Graph dstGraph)
-    {
-        Iterator<Triple> triples = srcGraph.find(Node.ANY, Node.ANY, Node.ANY) ;
-        triples.forEachRemaining(dstGraph::add) ;
-    }
-
-
-    @Test public void solve_01()
-    {
-        ResultSet rs1 = exec("(bgp (:s :p :o))", graph) ;
-        ResultSet rs2 = results("unit") ;
-        equals(rs1, rs2) ;
-    }
-    
-    @Test public void solve_02()
-    {
-        ResultSet rs1 = exec("(bgp (:s :p :o2))", graph) ;
-        ResultSet rs2 = results("empty") ;
-        equals(rs1, rs2) ;
-    }
-    
-    @Test public void solve_03()
-    {
-        // Above everything.
-        ResultSet rs1 = exec("(bgp (:zzzz :p 999999))", graph) ;
-        ResultSet rs2 = results("empty") ;
-        equals(rs1, rs2) ;
-    }
-    
-    @Test public void solve_04()
-    {
-        // Below everything.
-        ResultSet rs1 = exec("(bgp (:a :p :a))", graph) ;
-        ResultSet rs2 = results("empty") ;
-        equals(rs1, rs2) ;
-    }
-
-    @Test public void solve_05()
-    {
-        ResultSet rs1 = exec("(project (?s ?y) (bgp (?s :p ?z) (?z :q ?y)))", graph) ;
-        ResultSet rs2 = results("(row (?s :s) (?y :y))") ;
-        equals(rs1, rs2) ;
-    }
-    
-    @Test public void solve_06()
-    {
-        ResultSet rs1 = exec("(bgp (:s ?p ?o))", graph) ;
-        ResultSet rs2 = results("(row (?p :p) (?o :o))",
-                                "(row (?p :p) (?o 10))",
-                                "(row (?p :p) (?o :x))"
-                                ) ;
-        equals(rs1, rs2) ;
-    }
-
-    // ------
-    
-    private static void equals(ResultSet rs1, ResultSet rs2)
-    { same(rs1, rs2, true) ; }
-    
-    private static void same(ResultSet rs1, ResultSet rs2, boolean result)
-    {
-        ResultSetRewindable rsw1 = ResultSetFactory.makeRewindable(rs1) ;
-        ResultSetRewindable rsw2 = ResultSetFactory.makeRewindable(rs2) ;
-        boolean b = ResultSetCompare.equalsByValue(rsw1, rsw2) ;
-        if ( b != result)
-        {
-            System.out.println("Different: ") ;
-            rsw1.reset() ;
-            rsw2.reset() ;
-            ResultSetFormatter.out(rsw1) ;
-            ResultSetFormatter.out(rsw2) ;
-            System.out.println() ;
-        }
-        
-        assertTrue(b == result) ;
-    }
-    
-    private static ResultSet results(String... rows)
-    {
-        String str = "(table "+String.join("", rows)+")" ;
-        return SSE.parseTable(str).toResultSet() ; 
-    }
-    
-    
-    private static ResultSet exec(String pattern, Graph graph)
-    {
-        Op op = SSE.parseOp(pattern, pmap) ;
-        List<Var> vars =  new ArrayList<>() ;
-        vars.addAll(OpVars.visibleVars(op)) ;
-        QueryIterator qIter = Algebra.exec(op, graph) ;
-        return ResultSetFactory.create(qIter, Var.varNames(vars)) ;
-    }
-    
-    private static List<Binding> toList(QueryIterator qIter)
-    {
-        List<Binding> x = new ArrayList<>() ;
-        for ( ; qIter.hasNext() ; )
-            x.add(qIter.nextBinding()) ;
-        return x ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TestStats.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TestStats.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TestStats.java
deleted file mode 100644
index a0fd309..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/solver/TestStats.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.solver;
-
-import static org.junit.Assert.assertEquals ;
-
-import java.util.Iterator ;
-
-import org.apache.jena.atlas.lib.tuple.Tuple ;
-import org.apache.jena.graph.NodeFactory ;
-import org.apache.jena.sparql.core.Quad ;
-import org.apache.jena.sparql.sse.SSE ;
-import org.junit.Test ;
-import org.seaborne.dboe.jenax.Txn ;
-import org.seaborne.tdb2.junit.TL ;
-import org.seaborne.tdb2.solver.stats.StatsCollectorNodeId ;
-import org.seaborne.tdb2.solver.stats.StatsResults ;
-import org.seaborne.tdb2.store.DatasetGraphTDB ;
-import org.seaborne.tdb2.store.NodeId ;
-import org.seaborne.tdb2.store.nodetable.NodeTable ;
-import org.seaborne.tdb2.store.nodetupletable.NodeTupleTable ;
-import org.seaborne.tdb2.sys.TDBInternal ;
-
-public class TestStats
-{
-    static DatasetGraphTDB dsg      = TDBInternal.getDatasetGraphTDB(TL.createTestDatasetGraphMem()) ;
-    static NodeTupleTable quads     = dsg.getQuadTable().getNodeTupleTable() ;
-    static NodeTupleTable triples   = dsg.getTripleTable().getNodeTupleTable() ;
-    static NodeTable nt             = quads.getNodeTable() ;
-    
-    static Quad q1 = SSE.parseQuad("(<g1> <s> <p> 1)") ; 
-    static Quad q2 = SSE.parseQuad("(<g2> <s> <p> 2)") ; 
-    static Quad q3 = SSE.parseQuad("(<g2> <s> <p> 9)") ; 
-    static Quad q4 = SSE.parseQuad("(_    <s> <p> 1)") ; 
-    static {
-        Txn.executeWrite(dsg, ()->{
-            dsg.add(q1) ;
-            dsg.add(q2) ;
-            dsg.add(q3) ;
-            dsg.add(q4) ;
-        });
-    }
-    
-    private StatsResults statsForGraph(NodeId gid) {
-        // StatsCollectorNodeId writes nodes for rdf:type (this is not good).
-        return Txn.calculateWrite(dsg, ()-> {
-            Iterator<Tuple<NodeId>> iter = quads.find(gid, null, null, null) ;
-
-            StatsCollectorNodeId stats = new StatsCollectorNodeId(nt) ;
-            for ( ; iter.hasNext() ; ) {
-                Tuple<NodeId> t = iter.next() ;
-                stats.record(t.get(0), t.get(1), t.get(2), t.get(3)) ;
-            }
-
-            return stats.results() ;
-        }) ;
-    }
-
-    private StatsResults statsForDftGraph() {
-        // StatsCollectorNodeId writes nodes for rdf:type (this is not good).
-        return Txn.calculateWrite(dsg, ()-> {
-            Iterator<Tuple<NodeId>> iter = triples.findAll() ;
-
-            StatsCollectorNodeId stats = new StatsCollectorNodeId(nt) ;
-            for ( ; iter.hasNext() ; ) {
-                Tuple<NodeId> t = iter.next() ;
-                stats.record(null, t.get(0), t.get(1), t.get(2)) ;
-            }
-
-            return stats.results() ;
-        }) ;
-    }
-
-    @Test public void stats_01() {
-        StatsResults r = statsForDftGraph() ;
-        assertEquals(1, r.getCount()) ; 
-        assertEquals(1, r.getPredicates().keySet().size()) ;
-    }
-
-    @Test public void stats_02() { 
-        NodeId gid = nt.getNodeIdForNode(NodeFactory.createURI("g1")) ;
-        StatsResults r = statsForGraph(gid) ;
-        assertEquals(1, r.getCount()) ; 
-        assertEquals(1, r.getPredicates().keySet().size()) ;
-    }
-    
-    @Test public void stats_03() { 
-        NodeId gid = nt.getNodeIdForNode(NodeFactory.createURI("g2")) ;
-        StatsResults r = statsForGraph(gid) ;
-        assertEquals(2, r.getCount()) ; 
-        assertEquals(1, r.getPredicates().keySet().size()) ;
-    }
-    
-    @Test public void stats_04() { 
-        StatsResults r = statsForGraph(null) ;
-        assertEquals(3, r.getCount()) ; 
-        assertEquals(1, r.getPredicates().keySet().size()) ;
-    }
-
-}
-
-

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/AbstractTestStoreConnectionBasics.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/AbstractTestStoreConnectionBasics.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/AbstractTestStoreConnectionBasics.java
deleted file mode 100644
index 5f8cb67..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/AbstractTestStoreConnectionBasics.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-
-import static org.junit.Assert.*;
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.sparql.core.Quad ;
-import org.apache.jena.sparql.sse.SSE ;
-import org.junit.After ;
-import org.junit.Before ;
-import org.junit.Test ;
-import org.seaborne.dboe.base.file.Location ;
-import org.seaborne.dboe.jenax.Txn ;
-import org.seaborne.tdb2.sys.StoreConnection ;
-import org.seaborne.tdb2.sys.TDBInternal ;
-
-/** StoreConnection and transactions - basic wiring.
- *  These tests are slow on rotational disk.
- *  Complet cleaning of file areas is done.
- */ 
-public abstract class AbstractTestStoreConnectionBasics
-{
-    // Subclass to give direct and mapped versions.
-    
-    // Per-test unique-ish.
-    static int count = 0 ;
-    long x = System.currentTimeMillis()+(count++) ;
-    
-    Quad q  = SSE.parseQuad("(<g> <s> <p> '000-"+x+"') ") ;
-    Quad q1 = SSE.parseQuad("(<g> <s> <p> '111-"+x+"')") ;
-    Quad q2 = SSE.parseQuad("(<g> <s> <p> '222-"+x+"')") ;
-    Quad q3 = SSE.parseQuad("(<g> <s> <p> '333-"+x+"')") ;
-    Quad q4 = SSE.parseQuad("(<g> <s> <p> '444-"+x+"')") ;
-    
-    Location location = null ;
-
-    protected abstract Location getLocation() ;
-    
-    @Before public void before()
-    {
-        TDBInternal.reset() ;
-        location = getLocation() ;
-    }
-
-    @After public void after() { TDBInternal.reset() ; } 
-
-    @Test
-    public void store_01()
-    {
-        StoreConnection sConn = StoreConnection.connectCreate(location) ;
-        assertNotNull(sConn);
-        StoreConnection.release(location) ;
-        StoreConnection sConn2 = StoreConnection.connectExisting(location) ;
-        assertNull(sConn2);
-        StoreConnection sConn3 = StoreConnection.connectCreate(location) ;
-        assertNotNull(sConn3);
-    }
-
-    @Test
-    public void store_02()
-    {
-        StoreConnection sConn = StoreConnection.connectCreate(location) ;
-
-        { // Isolate to stop mix ups on variables.
-            DatasetGraphTDB dsg = sConn.getDatasetGraphTDB() ;
-            Txn.executeWrite(dsg, ()->{
-                dsg.add(q1) ;
-            }) ;
-
-            Txn.executeWrite(dsg, ()->{
-                assertTrue(dsg.contains(q1)) ;
-            }) ;
-
-            Txn.executeRead(dsg, ()->{
-                assertTrue(dsg.contains(q1)) ;
-            }) ;
-        }
-
-        {
-            StoreConnection sConn2 = StoreConnection.connectCreate(location) ;
-            DatasetGraphTDB dsg2 = sConn.getDatasetGraphTDB() ;
-            Txn.executeRead(dsg2, ()->{
-                assertTrue(dsg2.contains(q1)) ;
-            }) ;
-        }
-        
-        StoreConnection.release(sConn.getLocation()) ;
-        sConn = null ;
-        
-        {
-            if ( ! location.isMem() ) {
-                StoreConnection sConn2 = StoreConnection.connectCreate(location) ;
-                DatasetGraphTDB dsg3 = sConn2.getDatasetGraphTDB() ;
-                Txn.executeRead(dsg3, ()->{
-                    assertTrue(dsg3.contains(q1)) ;
-                }) ;
-            }
-        }
-    }
-    
-    @Test
-    public void store_03()
-    {
-        StoreConnection sConn = StoreConnection.connectCreate(location) ;
-        
-        DatasetGraphTDB dsg = sConn.getDatasetGraphTDB() ;
-        Txn.executeWrite(dsg, ()->{
-            dsg.add(q1) ;
-        }) ;
-        
-        Txn.executeWrite(dsg, ()->{
-            assertTrue(dsg.contains(q1)) ;
-        }) ;
-        
-        try { 
-            Txn.executeWrite(dsg, ()->{
-                dsg.add(q2) ;
-                throw new RuntimeException() ; 
-            }) ;
-            fail("Should not get to here!") ;
-        } catch (RuntimeException ex) {}
-
-        Txn.executeRead(dsg, ()->{
-            assertTrue(dsg.contains(q1)) ;
-            assertFalse(dsg.contains(q2)) ;
-        }) ;
-    }
-    
-    @Test
-    public void store_04()
-    {
-        StoreConnection sConn = StoreConnection.connectCreate(location) ;
-        
-        DatasetGraphTDB dsg = sConn.getDatasetGraphTDB() ;
-        Txn.executeWrite(dsg, ()->{
-            dsg.add(q1) ;
-        }) ;
-        
-        Txn.executeWrite(dsg, ()->{
-            assertTrue(dsg.contains(q1)) ;
-        }) ;
-
-        dsg.begin(ReadWrite.WRITE);
-        dsg.add(q2) ;
-        dsg.abort() ;
-        dsg.end() ;
-                
-        Txn.executeRead(dsg, ()->{
-            assertTrue(dsg.contains(q1)) ;
-            assertFalse(dsg.contains(q2)) ;
-        }) ;
-    }
-    
-    @Test
-    public void store_05()
-    {
-        StoreConnection sConn = StoreConnection.connectCreate(location) ;
-        
-        DatasetGraphTDB dsg = sConn.getDatasetGraphTDB() ;
-        Txn.executeWrite(dsg, ()->{
-            dsg.add(q3) ;
-        }) ;
-        
-        Txn.executeWrite(dsg, ()->{
-            assertTrue(dsg.contains(q3)) ;
-        }) ;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/AbstractTestTransPromoteTDB2.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/AbstractTestTransPromoteTDB2.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/AbstractTestTransPromoteTDB2.java
deleted file mode 100644
index 2a35fbb..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/AbstractTestTransPromoteTDB2.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import static org.junit.Assert.fail ;
-
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.sparql.JenaTransactionException;
-import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.transaction.AbstractTestTransPromote;
-import org.apache.log4j.Logger ;
-import org.junit.Ignore;
-import org.junit.Test ;
-
-/** Tests for transactions that start read and then promote to write */
-public abstract class AbstractTestTransPromoteTDB2 extends AbstractTestTransPromote {
-
-    protected AbstractTestTransPromoteTDB2(Logger[] loggers) {
-        super(loggers);
-    }
-    
-    // Copy in Jena 3.4.0 development
-    // write-end becomes an exception.
-    
-    @Override
-    @Ignore
-    @Test public void promote_snapshot_05()         { }
-    @Test public void promote_snapshot_05_x()         { run_05_X(false) ; }
-
-    @Override
-    @Ignore
-    @Test public void promote_readCommitted_05()    { }
-
-    @Test public void promote_readCommitted_05_x()    { run_05_X(true) ; }
-    
-    private void run_05_X(boolean readCommitted) {
-        //Assume.assumeTrue( ! readCommitted || supportsReadCommitted());
-        
-        setReadCommitted(readCommitted);
-        DatasetGraph dsg = create() ;
-        dsg.begin(ReadWrite.READ) ;
-        dsg.add(q1) ;
-        
-        try {
-            dsg.end() ;
-            fail("begin(W);end() did not throw an exception");
-        } catch ( JenaTransactionException ex) {}
-
-        assertCount(0, dsg) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TS_Store.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TS_Store.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TS_Store.java
deleted file mode 100644
index f92ac80..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TS_Store.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import org.junit.AfterClass ;
-import org.junit.BeforeClass ;
-import org.junit.runner.RunWith ;
-import org.junit.runners.Suite ;
-import org.seaborne.dboe.base.block.FileMode ;
-import org.seaborne.tdb2.store.value.TestDoubleNode62;
-import org.seaborne.tdb2.store.value.TestNodeIdInline;
-import org.seaborne.tdb2.sys.SystemTDB ;
-import org.seaborne.tdb2.sys.TestOps ;
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses( {
-    TestNodeId.class
-    , TestNodeIdInline.class
-    , TestDoubleNode62.class
-    , TestTripleTable.class
-    , TestGraphTDB.class
-    , TestGraphNamedTDB.class
-    , TestDatasetTDB.class
-    , TestDatasetTDBPersist.class
-    //, TestBulkLoader.class
-    // The script suite
-    , TestSuiteGraphTDB.class
-    
-    , Test_SPARQL_TDB.class
-    , TestDynamicDatasetTDB.class
-    , TestStoreConnectionMem.class
-    , TestStoreConnectionDirect.class
-    , TestStoreConnectionMapped.class
-    , TestStoreConnectionLock.class
-    , TestTransactions.class
-    , TestTransactionLifecycleTDB.class
-    , TestTransPromoteTDB.class
-    , TestQuadFilter.class
-} )
-public class TS_Store
-{ 
-    static FileMode mode ; 
-    
-    @BeforeClass
-    public static void beforeClass()
-    {
-        mode = SystemTDB.fileMode() ;
-    }
-    
-    @AfterClass
-    public static void afterClass()
-    {
-        if ( ! SystemTDB.fileMode().equals(mode) )
-            TestOps.setFileMode(mode) ;    
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDatasetTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDatasetTDB.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDatasetTDB.java
deleted file mode 100644
index 761d360..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDatasetTDB.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import static org.junit.Assert.*;
-import org.apache.jena.query.* ;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.rdf.model.ModelFactory ;
-import org.apache.jena.rdf.model.Property ;
-import org.apache.jena.rdf.model.Resource ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.sparql.core.Quad ;
-import org.apache.jena.sparql.sse.SSE ;
-import org.junit.After ;
-import org.junit.Before ;
-import org.junit.Test ;
-import org.seaborne.tdb2.TDB2 ;
-import org.seaborne.tdb2.junit.TL ;
-
-/** Tests of datasets, prefixes, special URIs etc (see also {@link org.apache.jena.sparql.graph.GraphsTests} */
-public class TestDatasetTDB
-{
-    private Dataset dataset ;
-    
-    @Before public void before() {
-        dataset = TL.createTestDatasetMem() ;
-        dataset.begin(ReadWrite.WRITE);
-    }
-    
-    @After public void after() {
-        dataset.abort();
-        dataset.end();
-        TL.expel(dataset);
-        
-    }
-    
-    private Dataset dataset() {
-        return dataset ;
-    }
-    
-    private static void load(Model model, String file)
-    {
-        RDFDataMgr.read(model, file) ;
-    }
-    
-    private static String base1 = "http://example/" ;
-    private static String baseNS = "http://example/ns#" ;
-    
-    private static void load1(Model model)
-    {
-        model.setNsPrefix("", base1) ;
-        Resource r1 = model.createResource(base1+"r1") ;
-        Property p1 = model.createProperty(baseNS+"p1") ;
-        model.add(r1, p1, "x1") ;
-        model.add(r1, p1, "x2") ;
-    }
-    
-    private static void load2(Model model)
-    {
-        Resource r2 = model.createResource(base1+"r2") ;
-        Property p1 = model.createProperty(baseNS+"p1") ;
-        model.add(r2, p1, "x1") ;
-        model.add(r2, p1, "x2") ;
-    }
-
-    private static void load3(Model model)
-    {
-        Resource r3 = model.createResource(base1+"r3") ;
-        Property p1 = model.createProperty(baseNS+"p2") ;
-        model.add(r3, p1, "x1") ;
-        model.add(r3, p1, "x2") ;
-    }
-
-    @Test public void prefix1()
-    {
-        Dataset ds = dataset() ;
-        Model m = ds.getDefaultModel() ;
-        load1(m) ;
-        String x = m.expandPrefix(":x") ;
-        assertEquals(x, base1+"x") ;
-    }
-    
-    @Test public void prefix2()
-    {
-        Dataset ds = dataset() ;
-        Model m = ds.getDefaultModel() ;
-        load1(m) ;
-        Model m2 = ds.getNamedModel("http://example/graph/") ;
-        String x = m2.expandPrefix(":x") ;
-        assertEquals(x, ":x") ;
-    }
-    
-    @Test public void query1()
-    {
-        Dataset ds = dataset() ;
-        Model m = ds.getDefaultModel() ;
-        load1(m) ;
-        
-        String qs = "CONSTRUCT {?s ?p ?o } WHERE {?s ?p ?o}" ;
-        Query q = QueryFactory.create(qs) ;
-        QueryExecution qExec = QueryExecutionFactory.create(q, ds) ;
-        Model m2 = qExec.execConstruct() ;
-        assertTrue(m.isIsomorphicWith(m2)) ;
-    }
-    
-    @Test public void query2()
-    {
-        Dataset ds = dataset() ;
-        Model m = ds.getDefaultModel() ;
-        load1(m) ;
-        
-        String qs = "CONSTRUCT {?s ?p ?o } WHERE { GRAPH <http://example/graph/> {?s ?p ?o}}" ;
-        Query q = QueryFactory.create(qs) ;
-        QueryExecution qExec = QueryExecutionFactory.create(q, ds) ;
-        Model m2 = qExec.execConstruct() ;
-        assertTrue(m2.isEmpty()) ;
-    }
-    
-    static String defaultGraph = Quad.defaultGraphIRI.getURI() ; 
-    static String unionGraph = Quad.unionGraph.getURI() ;
-    
-    @Test public void special1()
-    {
-        Dataset ds = dataset() ;
-        Model m = ds.getDefaultModel() ;
-        load1(m) ;
-        
-        String qs = "CONSTRUCT {?s ?p ?o } WHERE { GRAPH <"+defaultGraph+"> {?s ?p ?o}}" ;
-        Query q = QueryFactory.create(qs) ;
-        QueryExecution qExec = QueryExecutionFactory.create(q, ds) ;
-        Model m2 = qExec.execConstruct() ;
-        assertTrue(m.isIsomorphicWith(m2)) ;
-    }
-    
-    @Test public void special2()
-    {
-        Dataset ds = dataset() ;
-
-        load1(ds.getDefaultModel()) ;
-        load2(ds.getNamedModel("http://example/graph1")) ;
-        load3(ds.getNamedModel("http://example/graph2")) ;
-        
-        Model m = ModelFactory.createDefaultModel() ;
-        load2(m) ;
-        load3(m) ;
-        
-        String qs = "CONSTRUCT {?s ?p ?o } WHERE { GRAPH <"+unionGraph+"> {?s ?p ?o}}" ;
-        Query q = QueryFactory.create(qs) ;
-        QueryExecution qExec = QueryExecutionFactory.create(q, ds) ;
-        Model m2 = qExec.execConstruct() ;
-        assertTrue(m.isIsomorphicWith(m2)) ;
-    }
-    
-    @Test public void special3()
-    {
-        Dataset ds = dataset() ;
-
-        load1(ds.getDefaultModel()) ;
-        load2(ds.getNamedModel("http://example/graph1")) ;
-        load3(ds.getNamedModel("http://example/graph2")) ;
-        
-        Model m = ModelFactory.createDefaultModel() ;
-        load2(m) ;
-        load3(m) ;
-        
-        String qs = "CONSTRUCT {?s ?p ?o } WHERE { ?s ?p ?o }" ;
-        Query q = QueryFactory.create(qs) ;
-        QueryExecution qExec = QueryExecutionFactory.create(q, ds) ;
-        qExec.getContext().set(TDB2.symUnionDefaultGraph, true) ;
-        Model m2 = qExec.execConstruct() ;
-        if ( ! m.isIsomorphicWith(m2) )
-        {
-            System.out.println("---- ----") ;
-            SSE.write(ds.asDatasetGraph()) ;
-            System.out.println("-- Expected") ;
-            m.write(System.out, "TTL") ;
-            System.out.println("-- Actual") ;
-            m2.write(System.out, "TTL") ;
-            System.out.println("---- ----") ;
-
-        }
-        assertTrue(m.isIsomorphicWith(m2)) ;
-    }
-
-    @Test public void special4()
-    {
-        Dataset ds = dataset() ;
-
-        load1(ds.getDefaultModel()) ;
-        load2(ds.getNamedModel("http://example/graph1")) ;
-        load3(ds.getNamedModel("http://example/graph2")) ;        
-        
-        Model m = ModelFactory.createDefaultModel() ;
-        load2(m) ;
-        load3(m) ;
-        
-        String qs = "PREFIX : <"+baseNS+"> SELECT (COUNT(?x) as ?c) WHERE { ?x (:p1|:p2) 'x1' }" ;
-        Query q = QueryFactory.create(qs) ;
-        
-        long c_m ;
-        // Model
-        try (QueryExecution qExec = QueryExecutionFactory.create(q, m)) {
-            c_m = qExec.execSelect().next().getLiteral("c").getLong() ;
-        }
-
-        // dataset
-        long c_ds ;
-        try (QueryExecution qExec = QueryExecutionFactory.create(q, ds)) {
-            qExec.getContext().set(TDB2.symUnionDefaultGraph, true) ;        
-            c_ds = qExec.execSelect().next().getLiteral("c").getLong() ;
-        }
-        
-//        String qs2 = "PREFIX : <"+baseNS+"> SELECT * WHERE { ?x (:p1|:p2) 'x1' }" ;
-//        Query q2 = QueryFactory.create(qs2) ;
-//        qExec = QueryExecutionFactory.create(q2, ds) ;
-//        qExec.getContext().set(TDB.symUnionDefaultGraph, true) ;
-//        ResultSetFormatter.out(qExec.execSelect()) ;
-//        
-//        qExec = QueryExecutionFactory.create(q2, m) ;
-//        ResultSetFormatter.out(qExec.execSelect()) ;
-        // --------
-        
-        assertEquals(c_m, c_ds) ; 
-    }
-    
-    @Test public void special5()
-    {
-        Dataset ds = dataset() ;
-
-        //load1(ds.getDefaultModel()) ;
-        load1(ds.getNamedModel("http://example/graph1")) ;  // Same triples, different graph
-        load1(ds.getNamedModel("http://example/graph2")) ;
-        
-        Model m = ds.getNamedModel(unionGraph) ;
-        assertEquals(2, m.size()) ;
-    }
-    
-    // Put a model into a general dataset and use it.
-    @Test public void generalDataset1()
-    {
-        Dataset ds = dataset() ;
-        load1(ds.getDefaultModel()) ;
-        load2(ds.getNamedModel("http://example/graph1")) ;
-        load3(ds.getNamedModel("http://example/graph2")) ;
-        Model m = ds.getNamedModel("http://example/graph2") ;
-        
-        // Use graph2 as default model.
-        Dataset ds2 = DatasetFactory.create() ;
-        ds2.setDefaultModel(ds.getNamedModel("http://example/graph2")) ;
-        
-        String qs = "CONSTRUCT {?s ?p ?o } WHERE { ?s ?p ?o}" ;
-        Query q = QueryFactory.create(qs) ;
-        QueryExecution qExec = QueryExecutionFactory.create(q, ds2) ;
-        Model m2 = qExec.execConstruct() ;
-        assertTrue(m.isIsomorphicWith(m2)) ;
-    }
-    
-    @Test public void generalDataset2()
-    {
-        Dataset ds = dataset() ;
-        load1(ds.getDefaultModel()) ;
-        load2(ds.getNamedModel("http://example/graph1")) ;
-        load3(ds.getNamedModel("http://example/graph2")) ;
-        Model m = ds.getNamedModel("http://example/graph2") ;
-        
-        // Use graph1 as a differently named model.
-        Dataset ds2 = DatasetFactory.create() ;
-        ds2.addNamedModel("http://example/graphOther", m) ;
-        
-        String qs = "CONSTRUCT {?s ?p ?o } WHERE { {?s ?p ?o} UNION { GRAPH <http://example/graphOther> {?s ?p ?o} } }" ;
-        Query q = QueryFactory.create(qs) ;
-        QueryExecution qExec = QueryExecutionFactory.create(q, ds2) ;
-        Model m2 = qExec.execConstruct() ;
-        if ( ! m.isIsomorphicWith(m2) )
-        {
-            System.out.println(m.getGraph().getClass().getSimpleName()+"/"+m.size()+" : "+m2.getGraph().getClass().getSimpleName()+"/"+m2.size()) ;
-            System.out.println("---- Different:" ) ;
-            RDFDataMgr.write(System.out, m, Lang.TTL) ;
-            System.out.println("---- ----" ) ;
-            RDFDataMgr.write(System.out, m2, Lang.TTL) ;
-            System.out.println("---- ----") ;
-        }
-        
-        assertTrue(m.isIsomorphicWith(m2)) ;
-    }
-    
-    @Test public void generalDataset3()
-    {
-        Dataset ds = dataset() ;
-        load1(ds.getDefaultModel()) ;
-        load2(ds.getNamedModel("http://example/graph1")) ;
-        load3(ds.getNamedModel("http://example/graph2")) ;
-        Model m = ds.getDefaultModel() ;
-        
-        // Use the default model in one dataset as a named model in another.
-        Dataset ds2 = DatasetFactory.create() ;
-        ds2.addNamedModel("http://example/graphOther", m) ;
-        
-        String qs = "CONSTRUCT {?s ?p ?o } WHERE { {?s ?p ?o} UNION { GRAPH <http://example/graphOther> {?s ?p ?o} } }" ;
-        Query q = QueryFactory.create(qs) ;
-        QueryExecution qExec = QueryExecutionFactory.create(q, ds2) ;
-        Model m2 = qExec.execConstruct() ;
-        assertTrue(m.isIsomorphicWith(m2)) ;
-    }
-
-    // removeAll
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDatasetTDBPersist.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDatasetTDBPersist.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDatasetTDBPersist.java
deleted file mode 100644
index 24f56c6..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDatasetTDBPersist.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import static org.junit.Assert.assertFalse ;
-import static org.junit.Assert.assertTrue ;
-
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.graph.Triple ;
-import org.apache.jena.sparql.util.NodeFactoryExtra ;
-import org.junit.Test ;
-import org.seaborne.tdb2.junit.TL ;
-
-/** Testing persistence  */ 
-public class TestDatasetTDBPersist
-{
-    static Node n0 = NodeFactoryExtra.parseNode("<http://example/n0>") ; 
-    static Node n1 = NodeFactoryExtra.parseNode("<http://example/n1>") ;
-    static Node n2 = NodeFactoryExtra.parseNode("<http://example/n2>") ;
-    
-    @Test
-    public void dataset1() {
-        TL.exec((ds) -> {
-            assertTrue(ds.getDefaultModel().getGraph() instanceof GraphViewSwitchable) ;
-            assertTrue(ds.getNamedModel("http://example/").getGraph() instanceof GraphViewSwitchable) ;
-        }) ;
-    }
-    
-    @Test
-    public void dataset2() {
-        TL.exec((ds) -> {
-            Graph g1 = ds.getDefaultModel().getGraph() ;
-            Graph g2 = ds.getNamedModel("http://example/").getGraph() ;
-
-            g1.add(new Triple(n0, n1, n2)) ;
-            assertTrue(g1.contains(n0, n1, n2)) ;
-            assertFalse(g2.contains(n0, n1, n2)) ;
-        }) ;
-    }
-
-//    @Test
-//    public void dataset3() {
-//        TL.exec((ds) -> {
-//            Graph g1 = ds.getDefaultModel().getGraph() ;
-//            // Sometimes, under windows, deleting the files by
-//            // clearDirectory does not work.
-//            // Needed for safe tests on windows.
-//            g1.clear() ;
-//
-//            Graph g2 = ds.getNamedModel("http://example/").getGraph() ;
-//            g2.add(new Triple(n0, n1, n2)) ;
-//            assertTrue(g2.contains(n0, n1, n2)) ;
-//            assertFalse(g1.contains(n0, n1, n2)) ;
-//        }) ;
-//    }
-//
-//    @Test
-//    public void dataset4() {
-//        String graphName = "http://example/" ;
-//        Triple triple = SSE.parseTriple("(<x> <y> <z>)") ;
-//        Node gn = org.apache.jena.graph.NodeFactory.createURI(graphName) ;
-//
-//        TL.exec((ds) -> {
-//            // ?? See TupleLib.
-//            ds.asDatasetGraph().deleteAny(gn, null, null, null) ;
-//
-//            Graph g2 = ds.asDatasetGraph().getGraph(gn) ;
-//
-//            // Graphs only exists if they have a triple in them
-//            assertFalse(ds.containsNamedModel(graphName)) ;
-//
-//            List<String> names = Iter.toList(ds.listNames()) ;
-//            assertEquals(0, names.size()) ;
-//            assertEquals(0, ds.asDatasetGraph().size()) ;
-//        }) ;
-//    }
-//
-//    @Test
-//    public void dataset5() {
-//        String graphName = "http://example/" ;
-//        Triple triple = SSE.parseTriple("(<x> <y> <z>)") ;
-//        TL.exec((ds) -> {
-//            Graph g2 = ds.asDatasetGraph().getGraph(org.apache.jena.graph.NodeFactory.createURI(graphName)) ;
-//            // Graphs only exists if they have a triple in them
-//            g2.add(triple) ;
-//
-//            assertTrue(ds.containsNamedModel(graphName)) ;
-//            List<String> x = Iter.toList(ds.listNames()) ;
-//            List<String> y = Arrays.asList(graphName) ;
-//            assertEquals(x, y) ;
-//
-//            assertEquals(1, ds.asDatasetGraph().size()) ;
-//        }) ;
-//    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDynamicDatasetTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDynamicDatasetTDB.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDynamicDatasetTDB.java
deleted file mode 100644
index e3b4ce7..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestDynamicDatasetTDB.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.sparql.core.AbstractTestDynamicDataset ;
-import org.seaborne.tdb2.TDB2 ;
-import org.seaborne.tdb2.junit.TL ;
-
-public class TestDynamicDatasetTDB extends AbstractTestDynamicDataset
-{
-    @Override
-    protected Dataset createDataset()
-    {
-        Dataset ds = TL.createTestDatasetMem() ;
-        ds.begin(ReadWrite.WRITE);
-        return ds;
-    }
-    
-    @Override
-    protected void releaseDataset(Dataset ds) { ds.abort(); TL.expel(ds); }
-
-    protected void startDynamicAndUnionTest()    { TDB2.getContext().setTrue(TDB2.symUnionDefaultGraph) ; }
-
-    protected void finishDynamicAndUnionTest()   { TDB2.getContext().unset(TDB2.symUnionDefaultGraph) ; }
-
-}
-

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestGraphNamedTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestGraphNamedTDB.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestGraphNamedTDB.java
deleted file mode 100644
index 0427c6e..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestGraphNamedTDB.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.sparql.graph.AbstractTestGraph2 ;
-import org.apache.jena.sparql.util.NodeFactoryExtra ;
-import org.junit.After ;
-import org.junit.Before ;
-import org.seaborne.tdb2.junit.TL ;
-
-/** Programmatic tests on persistent graph */
-public class TestGraphNamedTDB extends AbstractTestGraph2
-{
-    static Node graphNode = NodeFactoryExtra.parseNode("<http://example/namedGraph>") ;
-    private Dataset dataset ;
-    private Graph   graph ;
-
-    @Before
-    public void before() {
-        dataset = TL.createTestDatasetMem() ;
-        dataset.begin(ReadWrite.WRITE);
-        graph = dataset.asDatasetGraph().getGraph(graphNode) ;
-    }
-
-    @After
-    public void after() {
-        dataset.abort();
-        dataset.end();
-        TL.expel(dataset) ;
-    }
-    
-    @Override
-    protected Graph emptyGraph() {
-        graph.clear() ;
-        return graph ;
-    }
-    
-    @Override
-    protected void returnGraph(Graph g)
-    {}
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestGraphTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestGraphTDB.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestGraphTDB.java
deleted file mode 100644
index e097350..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestGraphTDB.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import org.apache.jena.graph.Graph ;
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.sparql.graph.AbstractTestGraph2 ;
-import org.junit.After ;
-import org.junit.Before ;
-import org.seaborne.tdb2.junit.TL ;
-
-/** Programmatic tests on graphs */
-public class TestGraphTDB extends AbstractTestGraph2
-{
-    private Dataset dataset ;
-    private Graph   graph ;
-
-    @Before
-    public void before() {
-        dataset = TL.createTestDatasetMem() ;
-        dataset.begin(ReadWrite.WRITE);
-        graph = dataset.getDefaultModel().getGraph() ;
-    }
-
-    @After
-    public void after() {
-        dataset.abort();
-        dataset.end();
-        TL.expel(dataset) ;
-    }
-
-    @Override
-    protected Graph emptyGraph() {
-        graph.clear() ;
-        return graph ;
-    }
-    
-    @Override
-    protected void returnGraph(Graph g)
-    {}
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestNodeId.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestNodeId.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestNodeId.java
deleted file mode 100644
index d71810d..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestNodeId.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-
-import java.nio.ByteBuffer;
-
-import org.apache.jena.atlas.lib.BitsLong;
-import org.apache.jena.graph.Node;
-import org.apache.jena.sparql.util.NodeFactoryExtra;
-import org.junit.Test ;
-
-public class TestNodeId
-{
-    // Pointers.
-    @Test public void nodeId_ptr_01() {
-        NodeId nodeId = NodeIdFactory.createPtrLong(17, 37);
-        assertEquals(NodeIdType.PTR, nodeId.type());
-//        assertEquals(37L, nodeId.getPtrLo());
-//        assertEquals(17, nodeId.getPtrHi());
-        assertEquals(37L, nodeId.getValue2());
-        assertEquals(17, nodeId.getValue1());
-    }
-    
-    @Test public void nodeId_ptr_02() {
-        NodeId nodeId = NodeIdFactory.createPtr(37);
-        assertEquals(NodeIdType.PTR, nodeId.type());
-//        assertEquals(37L, nodeId.getPtrLo());
-//        assertEquals(0, nodeId.getPtrHi());
-        assertEquals(37L, nodeId.getPtrLocation());
-    }
-
-    @Test public void nodeId_ptr_03() {
-        NodeId nodeId = NodeIdFactory.createPtr(39);
-        // 64 bit
-        long x = nodeId.getValue2();
-        long t = BitsLong.unpack(x, 56, 64);
-        assertEquals(0, t);
-        assertEquals(NodeIdType.PTR.type(), t);
-    }
-    
-    // Specials.
-    @Test public void nodeId_special_01() {
-        assertFalse(NodeId.isConcrete(NodeId.NodeDoesNotExist));
-        assertEquals(NodeIdType.SPECIAL, NodeId.NodeDoesNotExist.type());
-    }
-    
-    @Test public void nodeId_special_02() {
-        assertFalse(NodeId.isConcrete(NodeId.NodeIdAny));
-        assertEquals(NodeIdType.SPECIAL, NodeId.NodeIdAny.type());
-    }
-    
-    // Storage
-    
-    @Test public void nodeId_codec_01() { testCodecArray(NodeIdFactory.createPtr(37)); }
-    
-    @Test public void nodeId_codec_02() { testCodecArray(NodeId.createRaw(NodeIdType.XSD_INTEGER, 1)); }
-    
-    // 56 bit -1.
-    @Test public void nodeId_codec_03() { testCodecArray(NodeId.createRaw(NodeIdType.XSD_INTEGER, BitsLong.clear(-1L, 56,64))); }
-
-    @Test public void nodeId_codec_04() { testCodecArray("12.34"); }
-    
-    @Test public void nodeId_codec_05() { testCodecArray("'2.2'^^xsd:float"); }
-
-    private static void testCodecArray(String str) {
-        Node n = NodeFactoryExtra.parseNode(str);
-        NodeId nid = NodeIdInline.inline(n);
-        testCodecArray(nid);
-    }
-
-    private static void testCodecArray(NodeId nid) {
-        testCodecArray(nid, nid);
-    }
-    
-    private static void testCodecArray(NodeId testNid,NodeId expected) {
-        byte[] b = new byte[8];
-        NodeIdFactory.set(testNid, b);
-        NodeId nid1 = NodeIdFactory.get(b);
-        assertEquals(expected, nid1);
-    }
-    
-    @Test public void nodeId_codec_11() { testCodecBuffer(NodeIdFactory.createPtr(37)); }
-    
-    @Test public void nodeId_codec_12() { testCodecBuffer(NodeId.createRaw(NodeIdType.XSD_INTEGER, 1)); }
-    
-    @Test public void nodeId_codec_13() { testCodecBuffer(NodeId.createRaw(NodeIdType.XSD_INTEGER, BitsLong.clear(-1L, 56,64))); }
-
-    @Test public void nodeId_codec_14() { testCodecBuffer("12.34"); }
-    
-    @Test public void nodeId_codec_15() { testCodecBuffer("'2.2'^^xsd:float"); }
-
-    private static void testCodecBuffer(String str) {
-        Node n = NodeFactoryExtra.parseNode(str);
-        NodeId nid = NodeIdInline.inline(n);
-        testCodecArray(nid);
-    }
-
-    private static void testCodecBuffer(NodeId nid) {
-        testCodecArray(nid, nid);
-    }
-    
-    private static void testCodecBuffer(NodeId testNid,NodeId expected) {
-        ByteBuffer b = ByteBuffer.allocate(8);
-        NodeIdFactory.set(testNid, b);
-        NodeId nid1 = NodeIdFactory.get(b);
-        assertEquals(expected, nid1);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestQuadFilter.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestQuadFilter.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestQuadFilter.java
deleted file mode 100644
index 51725de..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestQuadFilter.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import java.util.function.Predicate ;
-
-import static org.junit.Assert.*;
-import org.apache.jena.atlas.lib.tuple.Tuple ;
-import org.apache.jena.graph.NodeFactory ;
-import org.apache.jena.query.* ;
-import org.apache.jena.sparql.core.Quad ;
-import org.apache.jena.sparql.sse.SSE ;
-import org.apache.jena.system.Txn;
-import org.junit.AfterClass ;
-import org.junit.BeforeClass ;
-import org.junit.Ignore;
-import org.junit.Test ;
-import org.seaborne.tdb2.TDB2 ;
-import org.seaborne.tdb2.TDB2Factory ;
-import org.seaborne.tdb2.store.nodetable.NodeTable ;
-import org.seaborne.tdb2.sys.SystemTDB ;
-
-@Ignore("Quad filter tests not ready (transactions)")
-public class TestQuadFilter
-{
-    private static String graphToHide = "http://example/g2" ;
-    private static Dataset ds = setup() ;  
-    
-
-    @BeforeClass public static void beforeClass()
-    {
-        
-    }
-    
-    @AfterClass public static void afterClass() {}
-    
-    /** Example setup - in-memory dataset with two graphs, one triple in each */
-    private static Dataset setup()
-    {
-        Dataset ds = TDB2Factory.createDataset() ;
-        DatasetGraphTDB dsg = (DatasetGraphTDB)(ds.asDatasetGraph()) ;
-        Txn.executeWrite(dsg,  ()->{
-            Quad q1 = SSE.parseQuad("(<http://example/g1> <http://example/s> <http://example/p> <http://example/o1>)") ;
-            Quad q2 = SSE.parseQuad("(<http://example/g2> <http://example/s> <http://example/p> <http://example/o2>)") ;
-            dsg.add(q1) ;
-            dsg.add(q2) ;
-        });
-        return ds ;
-    }
-    
-    /** Create a filter to exclude the graph http://example/g2 */
-    private static Predicate<Tuple<NodeId>> createFilter(Dataset ds)
-    {
-        DatasetGraphTDB dsg = (DatasetGraphTDB)(ds.asDatasetGraph()) ;
-        final NodeTable nodeTable = dsg.getQuadTable().getNodeTupleTable().getNodeTable() ;
-        final NodeId target = nodeTable.getNodeIdForNode(NodeFactory.createURI(graphToHide)) ;
-        return item -> !( item.len() == 4 && item.get(0).equals(target) );
-    }            
-
-    @Test public void quad_filter_1()   { test("SELECT * { GRAPH ?g { ?s ?p ?o } }", 1, 2) ; }
-    @Test public void quad_filter_2()   { test("SELECT * { ?s ?p ?o }", 1, 2) ; }
-    @Test public void quad_filter_3()   { test("SELECT * { GRAPH ?g { } }", 1, 2) ; }
-    
-    private void test(String qs, int withFilter, int withoutFilter)
-    {
-        Predicate<Tuple<NodeId>> filter = createFilter(ds) ;
-        
-//    private static void example(Dataset ds, Filter<Tuple<NodeId>> filter)
-//    {
-//        String[] x = {
-//            "SELECT * { GRAPH ?g { ?s ?p ?o } }",
-//            "SELECT * { ?s ?p ?o }",
-//            // THis filter does not hide the graph itself, just the quads associated with the graph.
-//            "SELECT * { GRAPH ?g {} }"
-//            } ;
-        Query query = QueryFactory.create(qs) ;
-        
-        try(QueryExecution qExec = QueryExecutionFactory.create(query, ds)) {
-            // Install filter for this query only.
-            qExec.getContext().set(SystemTDB.symTupleFilter, filter) ;
-            qExec.getContext().setTrue(TDB2.symUnionDefaultGraph) ;
-            long x1 = ResultSetFormatter.consume(qExec.execSelect()) ;
-            assertEquals(withFilter, x1) ;
-        }
-        // No filter.
-        try(QueryExecution qExec = QueryExecutionFactory.create(query, ds)) {
-            qExec.getContext().setTrue(TDB2.symUnionDefaultGraph) ;
-            long x2 = ResultSetFormatter.consume(qExec.execSelect()) ;
-            assertEquals(withoutFilter, x2) ;
-        }
-
-    }
-        
-    
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionDirect.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionDirect.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionDirect.java
deleted file mode 100644
index 45a5bd9..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionDirect.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store ;
-
-import org.junit.AfterClass ;
-import org.junit.BeforeClass ;
-import org.seaborne.dboe.base.block.FileMode ;
-import org.seaborne.dboe.base.file.Location ;
-import org.seaborne.tdb2.ConfigTest ;
-import org.seaborne.tdb2.sys.SystemTDB ;
-import org.seaborne.tdb2.sys.TestOps ;
-
-/** Slow tests - complete cleaning of disk areas each time */
-public class TestStoreConnectionDirect extends AbstractTestStoreConnectionBasics {
-    static FileMode mode ;
-
-    @BeforeClass
-    public static void beforeClassFileMode() {
-        mode = SystemTDB.fileMode() ;
-        TestOps.setFileMode(FileMode.direct) ;
-    }
-
-    @AfterClass
-    public static void afterClassFileMode() {
-        TestOps.setFileMode(mode) ;
-    }
-
-    @Override
-    protected Location getLocation() {
-        return Location.create(ConfigTest.getCleanDir()) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionLock.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionLock.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionLock.java
deleted file mode 100644
index ad87de7..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionLock.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import static org.junit.Assert.*;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-import org.seaborne.dboe.base.file.AlreadyLocked;
-import org.seaborne.dboe.base.file.Location;
-import org.seaborne.dboe.base.file.ProcessFileLock;
-import org.seaborne.tdb2.sys.StoreConnection;
-
-/**
- * Tests for {@link ProcessFileLock} in conjunction with {@link StoreConnection}s 
- */
-public class TestStoreConnectionLock {
-    @Rule
-    public TemporaryFolder tempDir = new TemporaryFolder();
-    
-    @Test
-    public void lock_store_connection_01() {
-        Location dir = Location.create(tempDir.getRoot().getAbsolutePath());
-        ProcessFileLock lock = StoreConnection.lockForLocation(dir);
-        assertFalse(lock.isLockedHere());
-        
-        StoreConnection sConn = StoreConnection.connectCreate(dir);
-        assertEquals(dir, sConn.getLocation());
-        assertEquals(lock, sConn.getLock());
-        assertTrue(lock.isLockedHere());
-        
-        StoreConnection.release(dir);
-        assertFalse(lock.isLockedHere());
-    }
-    
-    @Test(expected=AlreadyLocked.class)
-    public void lock_store_connection_02() {
-        Location dir = Location.create(tempDir.getRoot().getAbsolutePath());
-        ProcessFileLock lock = StoreConnection.lockForLocation(dir);
-        lock.lockEx();
-        StoreConnection sConn = StoreConnection.connectCreate(dir);
-    }
-//        Location dir = Location.create(tempDir.getRoot().getAbsolutePath());
-//        // Creating a StoreConnection on the location will obtain the lock
-//         StoreConnection.make(dir);
-//        // Releasing the connection releases the lock
-//        StoreConnection.release(dir);
-//    }
-//
-//    @Test(expected = TDBException.class)
-//    public void location_lock_store_connection_02() throws IOException {
-//        Location dir = Location.create(tempDir.getRoot().getAbsolutePath());
-//        StoreConnection.make(dir);
-//    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionMapped.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionMapped.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionMapped.java
deleted file mode 100644
index de03337..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionMapped.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import org.junit.AfterClass ;
-import org.junit.BeforeClass ;
-import org.seaborne.dboe.base.block.FileMode ;
-import org.seaborne.dboe.base.file.Location ;
-import org.seaborne.tdb2.ConfigTest ;
-import org.seaborne.tdb2.sys.SystemTDB ;
-import org.seaborne.tdb2.sys.TestOps ;
-
-/** Slow tests - complete cleaning of disk areas each time */
-public class TestStoreConnectionMapped extends AbstractTestStoreConnectionBasics
-{
-    static FileMode mode ;   
-
-    @BeforeClass
-    public static void beforeClassFileMode()
-    {
-        mode = SystemTDB.fileMode() ;
-        TestOps.setFileMode(FileMode.mapped) ;
-    }
-
-    @AfterClass
-    public static void afterClassFileMode()
-    {
-        TestOps.setFileMode(mode) ;
-    }
-
-    @Override
-    protected Location getLocation() {
-        return Location.create(ConfigTest.getCleanDir()) ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionMem.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionMem.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionMem.java
deleted file mode 100644
index e7a7bad..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestStoreConnectionMem.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import org.seaborne.dboe.base.file.Location ;
-
-public class TestStoreConnectionMem extends AbstractTestStoreConnectionBasics
-{
-    @Override
-    protected Location getLocation() {
-        return Location.mem("TestStoreConnection") ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestSuiteGraphTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestSuiteGraphTDB.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestSuiteGraphTDB.java
deleted file mode 100644
index d931532..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestSuiteGraphTDB.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import junit.framework.TestSuite ;
-
-import org.junit.runner.RunWith ;
-import org.junit.runners.AllTests ;
-import org.seaborne.tdb2.ConfigTest ;
-import org.seaborne.tdb2.junit.TestFactoryTDB ;
-
-/** Scripted test generation */
-
-@RunWith(AllTests.class)
-public class TestSuiteGraphTDB extends TestSuite
-{
-    static public TestSuite suite() { return new TestSuiteGraphTDB() ; }
-    
-    private TestSuiteGraphTDB()
-    {
-        super("TDB-Scripts") ;
-        String manifestMain = ConfigTest.getTestingDataRoot()+"/manifest.ttl" ;
-        TestFactoryTDB.make(this, manifestMain, "TDB-") ;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransPromoteTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransPromoteTDB.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransPromoteTDB.java
deleted file mode 100644
index 2814f32..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransPromoteTDB.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import org.apache.jena.sparql.core.DatasetGraph;
-import org.apache.log4j.Logger;
-import org.seaborne.dboe.transaction.txn.Transaction;
-import org.seaborne.dboe.transaction.txn.TransactionCoordinator;
-import org.seaborne.dboe.transaction.txn.TransactionException;
-import org.seaborne.tdb2.DatabaseMgr ;
-
-public class TestTransPromoteTDB extends AbstractTestTransPromoteTDB2 {
-
-    public TestTransPromoteTDB() {
-        super(getLoggers());
-    }
-
-    private static Logger[] getLoggers() {
-        return new Logger[]{ Logger.getLogger(Transaction.class) } ;
-    }
-    
-    @Override
-    protected void setPromotion(boolean b) {
-        TransactionCoordinator.promotion = b ;
-    }
-
-    @Override
-    protected boolean getPromotion() {
-        return TransactionCoordinator.promotion ;
-    }
-
-    @Override
-    protected void setReadCommitted(boolean b) {
-        TransactionCoordinator.readCommittedPromotion = b ;
-    }
-
-    @Override
-    protected boolean getReadCommitted() {
-        return TransactionCoordinator.readCommittedPromotion ;
-    }
-
-    @Override
-    protected Class<? extends Exception> getTransactionExceptionClass() {
-        return TransactionException.class;
-    }
-
-    @Override
-    protected DatasetGraph create() {
-        return DatabaseMgr.createDatasetGraph();
-    }
-
-    @Override
-    protected boolean supportsReadCommitted() {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransactionLifecycleTDB.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransactionLifecycleTDB.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransactionLifecycleTDB.java
deleted file mode 100644
index 4fded46..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransactionLifecycleTDB.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.sparql.transaction.AbstractTestTransactionLifecycle;
-import org.seaborne.tdb2.TDB2Factory ;
-
-/** Transaction tests - from ARQ */
-public class TestTransactionLifecycleTDB extends AbstractTestTransactionLifecycle
-{
-    @Override
-    protected Dataset create() {
-        return TDB2Factory.createDataset() ;
-    }
-}
-
-

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransactions.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransactions.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransactions.java
deleted file mode 100644
index d6b98d9..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTransactions.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import java.io.StringReader ;
-import java.util.Iterator;
-
-import org.apache.jena.atlas.iterator.Iter ;
-import static org.junit.Assert.*;
-import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.query.Dataset ;
-import org.apache.jena.query.ReadWrite;
-import org.apache.jena.rdf.model.Model ;
-import org.apache.jena.rdf.model.Statement;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.sparql.core.Quad;
-import org.junit.After ;
-import org.junit.Before ;
-import org.junit.Test ;
-import org.seaborne.dboe.base.file.Location ;
-import org.seaborne.dboe.jenax.Txn ;
-import org.seaborne.dboe.transaction.txn.TransactionException;
-import org.seaborne.tdb2.TDB2Factory ;
-import org.seaborne.tdb2.sys.TDBInternal;
-
-/** Transactions and store connections - extended tests assuming the
- * basics work. Hence these tests use memory databases. 
- * 
- * For tests of StoreConnection basics:
- * @see AbstractTestStoreConnectionBasics
- * @see TestStoreConnectionDirect
- * @see TestStoreConnectionMapped
- * @see TestStoreConnectionMem
- */
-public class TestTransactions
-{
-    // Per-test unique-ish.
-    static int count = 0 ;
-    long x = System.currentTimeMillis()+(count++) ;
-    
-    String ns = "http://example/TestTransactions#" ;
-    String data1 = StrUtils.strjoinNL
-        ("prefix : <"+ns+">"
-        ,":s :p '000-"+x+"' ."
-        ,":s :p '111-"+x+"' ."
-        ," :g {"
-        ,"    :s :p '222-"+x+"' ."
-        ,"    :s :p '333-"+x+"' ."
-        ,"    :s :p '444-"+x+"' ."
-        ,"}"
-        ) ;
-    String data2 = StrUtils.strjoinNL
-        ("prefix : <"+ns+">"
-        ,":s :p 'AAA-"+x+"' ."
-        ,":s :p 'BBB-"+x+"' ."
-        ,":s :p 'CCC-"+x+"' ."
-        ,":s :p 'DDD-"+x+"' ."
-        ) ;
-    
-    Dataset dataset ; 
-    Location location ;
-    
-    @Before public void before() {
-        location = Location.mem() ;
-        dataset = TDB2Factory.connectDataset(location) ;
-    }
-
-    @After public void after() {
-        dataset.close() ;
-        TDBInternal.expel(dataset.asDatasetGraph());
-    }
-
-    // Models across transactions
-    @Test public void trans_01() {
-        Model named = dataset.getNamedModel(ns+"g") ;
-        Txn.executeWrite(dataset, ()->{
-            RDFDataMgr.read(dataset, new StringReader(data1), null, Lang.TRIG) ;
-        }) ;
-
-        Txn.executeRead(dataset, ()->{
-            long x1 = Iter.count(dataset.getDefaultModel().listStatements()) ;
-            assertEquals(2, x1) ;
-            long x2 = Iter.count(named.listStatements()) ;
-            assertEquals(3, x2) ;
-        }) ;
-        
-    }
-    
-    @Test public void trans_02() {
-        Model model = dataset.getDefaultModel() ;
-        Txn.executeWrite(dataset, ()->{
-            RDFDataMgr.read(model, new StringReader(data2), null, Lang.TURTLE) ;
-        }) ;
-        Txn.executeRead(dataset, ()->{
-            assertEquals(4, model.size()) ;
-        }) ;        
-    }
-    
-    // Iterators and trasnaxction scope.
-    
-    private void load(String data) { 
-        Txn.executeWrite(dataset, ()->{
-            RDFDataMgr.read(dataset, new StringReader(data), null, Lang.TURTLE) ;
-        }) ;
-    }
-    
-    public void iterator_01() {
-        load(data2);
-        
-        dataset.begin(ReadWrite.READ);
-        Iterator<Quad> iter = TDBInternal.getDatasetGraphTDB(dataset).find();
-        Iter.consume(iter);
-        dataset.end();
-    }
-    
-    @Test(expected=TransactionException.class)
-    public void iterator_02() {
-        load(data2);
-        
-        dataset.begin(ReadWrite.READ);
-        Iterator<Quad> iter = dataset.asDatasetGraph().find();
-        dataset.end();
-        iter.next();
-    }
-    
-    @Test(expected=TransactionException.class)
-    public void iterator_03() {
-        load(data2);
-        
-        dataset.begin(ReadWrite.READ);
-        Iterator<Quad> iter = TDBInternal.getDatasetGraphTDB(dataset).find();
-        dataset.end();
-        iter.next();
-    }
-
-    @Test(expected=TransactionException.class)
-    public void iterator_04() {
-        load(data2);
-        Iterator<Statement> iter = Txn.calculateRead(dataset, ()->dataset.getDefaultModel().listStatements());
-        iter.next();
-    }
-    
-    @Test(expected=TransactionException.class)
-    public void iterator_05() {
-        load(data2);
-        Iterator<Statement> iter = Txn.calculateWrite(dataset, ()->dataset.getDefaultModel().listStatements());
-        iter.next();
-    }
-
-    @Test(expected=TransactionException.class)
-    public void iterator_06() {
-        load(data2);
-        
-        dataset.begin(ReadWrite.READ);
-        Iterator<Quad> iter = dataset.asDatasetGraph().find();
-        dataset.end();
-        
-        dataset.begin(ReadWrite.READ);
-        iter.next();
-        dataset.end();
-    }
-    
-//    @Test
-//    public void iterator_07() {
-//        load(data2);
-//        
-//        // Isolated by copy.
-//        Iterator<Quad> iter = TDBInternal.getDatasetGraphTDB(dataset).find();
-//        
-//        dataset.begin(ReadWrite.READ);
-//        iter.next();
-//        dataset.end();
-//    }
-//
-//    @Test
-//    public void iterator_08() {
-//        load(data2);
-//        
-//        // Isolated by copy.
-//        Iterator<Quad> iter = TDBInternal.getDatasetGraphTDB(dataset).find();
-//        
-//        dataset.begin(ReadWrite.READ);
-//        dataset.end();
-//        iter.next();
-//    }
-}
-
-

http://git-wip-us.apache.org/repos/asf/jena/blob/3d456654/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTripleTable.java
----------------------------------------------------------------------
diff --git a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTripleTable.java b/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTripleTable.java
deleted file mode 100644
index b95667c..0000000
--- a/jena-db/jena-tdb2/src/test/java/org/seaborne/tdb2/store/TestTripleTable.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.seaborne.tdb2.store;
-
-import java.util.Iterator ;
-
-import static org.junit.Assert.*;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.graph.Triple ;
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.sparql.util.NodeFactoryExtra ;
-import org.apache.log4j.Level ;
-import org.apache.log4j.Logger ;
-import org.junit.Test ;
-import org.seaborne.dboe.base.file.Location ;
-import org.seaborne.tdb2.setup.TDBBuilder ;
-
-public class TestTripleTable
-{
-    static {
-        Logger.getLogger("org.apache.jena.tdb.info").setLevel(Level.WARN) ;
-        Logger.getLogger("org.apache.jena.tdb.exec").setLevel(Level.WARN) ;
-    }
-
-    private static void add(TripleTable table, Node s, Node p, Node o)
-    {
-        table.add(new Triple(s,p,o)) ;
-    }
-
-    private static void notMatch(TripleTable table, Node s, Node p, Node o)
-    {
-        Iterator<Triple> iter = table.find(s, p, o) ;
-        assertNotNull(iter) ;
-        assertFalse(iter.hasNext()) ;
-    }
-
-    private static void match(TripleTable table, Node s, Node p, Node o)
-    {
-        Iterator<Triple> iter = table.find(s, p, o) ;
-        assertNotNull(iter) ;
-        assertTrue(iter.hasNext()) ;
-    }
-    
-    
-    private static void contains(TripleTable table, Node s, Node p, Node o)
-    {
-        Iterator<Triple> iter = table.find(s, p, o) ;
-        assertNotNull(iter) ;
-        assertTrue(iter.hasNext()) ;
-        assertEquals(new Triple(s, p, o), iter.next()) ;
-        assertFalse(iter.hasNext()) ;
-    }
-    
-    static Node n1 = NodeFactoryExtra.parseNode("<http://example/n1>") ;
-    static Node n2 = NodeFactoryExtra.parseNode("<http://example/n2>") ;
-    static Node n3 = NodeFactoryExtra.parseNode("<http://example/n3>") ;
-    static Node n4 = NodeFactoryExtra.parseNode("<http://example/n4>") ;
-    static Node n5 = NodeFactoryExtra.parseNode("<http://example/n5>") ;
-    static Node n6 = NodeFactoryExtra.parseNode("<http://example/n6>") ;
-    
-    @Test public void createTripleTable1()
-    { 
-        TripleTable table = createTripleTableMem() ; 
-        notMatch(table, n1, n2, n3) ;
-    }
-    
-    @Test public void add1()
-    { 
-        TripleTable table = createTripleTableMem() ;
-        table.add(new Triple(n1,n2,n3)) ;
-    }
-    
-    @Test public void find1()
-    { 
-        TripleTable table = createTripleTableMem() ;
-        add(table, n1, n2, n3) ;
-        contains(table, n1, n2, n3) ;
-        notMatch(table, n1, n2, n4) ;
-    }
-
-    @Test public void find2()
-    { 
-        TripleTable table = createTripleTableMem() ;
-        add(table, n1, n2, n3) ;
-        add(table, n1, n2, n4) ;
-        contains(table, n1, n2, n3) ;
-        contains(table, n1, n2, n4) ;
-    }
-
-    @Test public void find3()
-    { 
-        TripleTable table = createTripleTableMem() ;
-        add(table, n1, n2, n3) ;
-        add(table, n4, n5, n6) ;
-        contains(table, n1, n2, n3) ;
-        contains(table, n4, n5, n6) ;
-        notMatch(table, n1, n2, n4) ;
-    }
-
-    @Test public void find4()
-    { 
-        TripleTable table = createTripleTableMem() ;
-        add(table, n1, n2, n3) ;
-        add(table, n4, n5, n6) ;
-        match(table, Node.ANY, n2, n3) ;
-        match(table, null, n2, n3) ;
-        match(table, null, null, null) ;
-    }
-    
-    private TripleTable createTripleTableMem()
-    {
-        DatasetGraphTxn dsx = TDBBuilder.build(Location.mem()) ;
-        dsx.begin(ReadWrite.WRITE);
-        DatasetGraphTDB ds = (DatasetGraphTDB)dsx ;
-        return ds.getTripleTable() ;
-    }
-}


Mime
View raw message