clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1531385 - in /clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage: MultiThreadedSingleTdbDatasetTest.java MultiThreadedTestSingleTdb.java
Date Fri, 11 Oct 2013 18:38:26 GMT
Author: reto
Date: Fri Oct 11 18:38:26 2013
New Revision: 1531385

URL: http://svn.apache.org/r1531385
Log:
CLEREZZA-792: just double checked that the issue does not affected the much superior SingleTdbDatasetTcProvider

Added:
    clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
      - copied, changed from r1531334, clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
Modified:
    clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java

Modified: clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
URL: http://svn.apache.org/viewvc/clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java?rev=1531385&r1=1531384&r2=1531385&view=diff
==============================================================================
--- clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
(original)
+++ clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedSingleTdbDatasetTest.java
Fri Oct 11 18:38:26 2013
@@ -32,7 +32,6 @@ import java.util.List;
 import java.util.Random;
 import java.util.Set;
 
-import junit.framework.Assert;
 
 import org.apache.clerezza.rdf.core.BNode;
 import org.apache.clerezza.rdf.core.Literal;
@@ -43,6 +42,7 @@ import org.apache.clerezza.rdf.core.acce
 import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
 import org.apache.clerezza.rdf.core.impl.TripleImpl;
 import org.junit.AfterClass;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -251,7 +251,11 @@ public class MultiThreadedSingleTdbDatas
     @AfterClass
     public static void cleanUpDirectory() throws IOException {
         provider.deactivate(null);
-        TdbTcProvider.delete(tempFile);
+        try {
+            TdbTcProvider.delete(tempFile);
+        } catch (IOException e) {
+            System.err.println("Failed removing tempfile "+tempFile);
+        }
     }
 
 }

Copied: clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
(from r1531334, clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java)
URL: http://svn.apache.org/viewvc/clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java?p2=clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java&p1=clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java&r1=1531334&r2=1531385&rev=1531385&view=diff
==============================================================================
--- clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTest.java
(original)
+++ clerezza/trunk/rdf.jena.tdb.storage/src/test/java/org/apache/clerezza/rdf/jena/tdb/storage/MultiThreadedTestSingleTdb.java
Fri Oct 11 18:38:26 2013
@@ -24,7 +24,10 @@ package org.apache.clerezza.rdf.jena.tdb
 import java.io.File;
 import java.io.IOException;
 import java.util.Collections;
+import java.util.Dictionary;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Hashtable;
 import java.util.Set;
 
 
@@ -34,16 +37,18 @@ import org.apache.clerezza.rdf.core.MGra
 import org.apache.clerezza.rdf.core.Resource;
 import org.apache.clerezza.rdf.core.Triple;
 import org.apache.clerezza.rdf.core.UriRef;
+import org.apache.clerezza.rdf.core.access.TcProvider;
 import org.apache.clerezza.rdf.core.impl.PlainLiteralImpl;
 import org.apache.clerezza.rdf.core.impl.TripleImpl;
 import org.apache.felix.scr.annotations.Activate;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.osgi.service.cm.ConfigurationException;
 import org.wymiwyg.commons.util.Util;
 
 
-public class MultiThreadedTest {
+public class MultiThreadedTestSingleTdb {
     
     
     
@@ -102,15 +107,17 @@ public class MultiThreadedTest {
     
     
     @Before
-    public void setUp() throws IOException {
+    public void setUp() throws IOException, ConfigurationException {
         File tempFile;
         UriRef MGRAPHNAME = new UriRef("http://text.example.org/");
-        TdbTcProvider tdbTcProvider;
+        TcProvider tdbTcProvider;
         tempFile = File.createTempFile("tdbtest", null);
         tempFile.delete();
         tempFile.mkdirs();
-        tdbTcProvider = new TdbTcProvider(tempFile);
-        tdbTcProvider.activate(null);
+        Dictionary<String, Object> dict = new Hashtable<String, Object>();
+        dict.put(SingleTdbDatasetTcProvider.TDB_DIR, tempFile.getAbsolutePath());
+        tdbTcProvider = new SingleTdbDatasetTcProvider(dict);
+        //tdbTcProvider.activate(null);
         mGraph = tdbTcProvider.createMGraph(MGRAPHNAME);
     }
 



Mime
View raw message