jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [2/3] jena git commit: Add relaseDataset to complete the lifecycle
Date Fri, 15 May 2015 12:00:19 GMT
Add relaseDataset to complete the lifecycle


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

Branch: refs/heads/master
Commit: 8fd7226efc27b864e61ce888fe62cddd353e881c
Parents: e5ded6d
Author: Andy Seaborne <andy@apache.org>
Authored: Fri May 15 11:45:36 2015 +0100
Committer: Andy Seaborne <andy@apache.org>
Committed: Fri May 15 11:45:36 2015 +0100

----------------------------------------------------------------------
 .../apache/jena/sparql/core/AbstractTestDynamicDataset.java  | 5 ++++-
 .../org/apache/jena/sparql/core/TestDynamicDatasetMem.java   | 8 ++------
 .../org/apache/jena/tdb/store/TestDynamicDatasetTDB.java     | 3 +++
 3 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/8fd7226e/jena-arq/src/test/java/org/apache/jena/sparql/core/AbstractTestDynamicDataset.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/core/AbstractTestDynamicDataset.java
b/jena-arq/src/test/java/org/apache/jena/sparql/core/AbstractTestDynamicDataset.java
index c2c6357..4713055 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/core/AbstractTestDynamicDataset.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/core/AbstractTestDynamicDataset.java
@@ -30,9 +30,12 @@ import org.junit.Test ;
 public abstract class AbstractTestDynamicDataset extends BaseTest
 {
     protected abstract Dataset createDataset() ;
+    protected abstract void releaseDataset(Dataset ds) ;
     Dataset  dataset ;
     
-    @After public void after() {}
+    @After public void after() {
+        releaseDataset(dataset) ; 
+    }
 
     @Before public void before()
     {

http://git-wip-us.apache.org/repos/asf/jena/blob/8fd7226e/jena-arq/src/test/java/org/apache/jena/sparql/core/TestDynamicDatasetMem.java
----------------------------------------------------------------------
diff --git a/jena-arq/src/test/java/org/apache/jena/sparql/core/TestDynamicDatasetMem.java
b/jena-arq/src/test/java/org/apache/jena/sparql/core/TestDynamicDatasetMem.java
index 58afb60..5377d4c 100644
--- a/jena-arq/src/test/java/org/apache/jena/sparql/core/TestDynamicDatasetMem.java
+++ b/jena-arq/src/test/java/org/apache/jena/sparql/core/TestDynamicDatasetMem.java
@@ -20,20 +20,16 @@ package org.apache.jena.sparql.core;
 
 import org.apache.jena.query.Dataset ;
 import org.apache.jena.query.DatasetFactory ;
-import org.junit.After ;
-import org.junit.Before ;
 
 public class TestDynamicDatasetMem extends AbstractTestDynamicDataset
 {
-
-    @Before public void before1() {}
-    @After public void after1() {}
-    
     @Override
     protected Dataset createDataset()
     {
         return DatasetFactory.createMem() ;
     }
+    @Override
+    protected void releaseDataset(Dataset ds) {}
 
 }
 

http://git-wip-us.apache.org/repos/asf/jena/blob/8fd7226e/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestDynamicDatasetTDB.java
----------------------------------------------------------------------
diff --git a/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestDynamicDatasetTDB.java b/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestDynamicDatasetTDB.java
index 54aed0c..1a684f6 100644
--- a/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestDynamicDatasetTDB.java
+++ b/jena-tdb/src/test/java/org/apache/jena/tdb/store/TestDynamicDatasetTDB.java
@@ -31,6 +31,9 @@ public class TestDynamicDatasetTDB extends AbstractTestDynamicDataset
         return TDBFactory.createDataset() ;
     }
     
+    @Override
+    protected void releaseDataset(Dataset ds) {}
+    
     protected void startDynamicAndUnionTest()    { TDB.getContext().setTrue(TDB.symUnionDefaultGraph)
; }
 
     protected void finishDynamicAndUnionTest()   { TDB.getContext().unset(TDB.symUnionDefaultGraph)
; }


Mime
View raw message