You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/09/30 14:53:52 UTC

svn commit: r1392021 - in /jena/trunk/jena-sdb: ./ src-test/com/hp/hpl/jena/sdb/test/ testing/ testing/StoreDesc/ testing/StoreDescSimple/

Author: andy
Date: Sun Sep 30 12:53:51 2012
New Revision: 1392021

URL: http://svn.apache.org/viewvc?rev=1392021&view=rev
Log:
Add Apache Derby to databases tested in the standard setup.

Modified:
    jena/trunk/jena-sdb/pom.xml
    jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestAll.java
    jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestSetup.java
    jena/trunk/jena-sdb/testing/StoreDesc/derby-hash.ttl
    jena/trunk/jena-sdb/testing/StoreDesc/derby-index.ttl
    jena/trunk/jena-sdb/testing/StoreDescSimple/derby-layout1.ttl
    jena/trunk/jena-sdb/testing/store-list-simple.ttl
    jena/trunk/jena-sdb/testing/store-list.ttl

Modified: jena/trunk/jena-sdb/pom.xml
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/pom.xml?rev=1392021&r1=1392020&r2=1392021&view=diff
==============================================================================
--- jena/trunk/jena-sdb/pom.xml (original)
+++ jena/trunk/jena-sdb/pom.xml Sun Sep 30 12:53:51 2012
@@ -99,6 +99,13 @@
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+      <version>10.9.1.0</version>
+      <scope>test</scope>
+    </dependency>
+
     <!-- Choose your logging provider -->
     <!--
       <dependency>
@@ -145,7 +152,7 @@
         <version>2.9</version>
         <configuration>
           <includes>
-            <!-- Requires HSQL to be set in 
+            <!-- Requires HSQL and Apache Derbey to be set in 
                  store-list.ttl and store-list-simple.ttl
             -->
             <include>com/hp/hpl/jena/sdb/test/SDBTestAll.java</include>

Modified: jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestAll.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestAll.java?rev=1392021&r1=1392020&r2=1392021&view=diff
==============================================================================
--- jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestAll.java (original)
+++ jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestAll.java Sun Sep 30 12:53:51 2012
@@ -24,10 +24,17 @@ import org.junit.runners.Suite;
 /** Not quite all, yet: Does not yet include the model tests which need to be the linked to the store descriptions */
 @RunWith(Suite.class)
 @Suite.SuiteClasses( {
+    SDBTestSetup.class ,    // Must be first
     SDBTestMisc.class,
     SDBQueryTestSuite.class,
     SDBUpdateTestSuite.class
 } )
 
+/** Derby needs this before the tests;
+    sdbconfig --sdb testing/StoreDescSimple/derby-layout1.ttl --format
+    sdbconfig --sdb testing/StoreDesc/derby-hash.ttl  --format
+    sdbconfig --sdb testing/StoreDesc/derby-index.ttl  --format
+ */
+
 public class SDBTestAll
 { }

Modified: jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestSetup.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestSetup.java?rev=1392021&r1=1392020&r2=1392021&view=diff
==============================================================================
--- jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestSetup.java (original)
+++ jena/trunk/jena-sdb/src-test/com/hp/hpl/jena/sdb/test/SDBTestSetup.java Sun Sep 30 12:53:51 2012
@@ -18,8 +18,14 @@
 
 package com.hp.hpl.jena.sdb.test;
 
+import org.junit.AfterClass ;
+import org.junit.BeforeClass ;
+import org.junit.Test ;
+import org.openjena.atlas.junit.BaseTest ;
+import org.openjena.atlas.lib.FileOps ;
 
-public class SDBTestSetup
+
+public class SDBTestSetup extends BaseTest
 {
     public static final String testDirSDB           = "testing/" ;
     public static final String manifestMain         = testDirSDB + "manifest-sdb.ttl" ;
@@ -30,4 +36,24 @@ public class SDBTestSetup
     
     public static final String storeList            = testDirSDB+"store-list.ttl" ;
     public static final String storeListSimple      = testDirSDB+"store-list-simple.ttl" ;
+    
+    /* Derby needs this before the tests;
+        sdbconfig --sdb testing/StoreDescSimple/derby-layout1.ttl --format
+        sdbconfig --sdb testing/StoreDesc/derby-hash.ttl  --format
+        sdbconfig --sdb testing/StoreDesc/derby-index.ttl  --format
+     */
+
+    @BeforeClass public static void beforeClass() {
+        FileOps.ensureDir("target") ;
+        FileOps.ensureDir("target/Derby-test") ;
+        sdb.sdbconfig.main("--sdb=testing/StoreDescSimple/derby-layout1.ttl", "--format") ;
+        sdb.sdbconfig.main("--sdb=testing/StoreDesc/derby-hash.ttl", "--format") ;
+        sdb.sdbconfig.main("--sdb=testing/StoreDesc/derby-index.ttl", "--format") ;
+    }
+    
+    @AfterClass public static void afterClass() {
+    }
+    
+    @Test public void dummy() {}
+    
 }

Modified: jena/trunk/jena-sdb/testing/StoreDesc/derby-hash.ttl
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/testing/StoreDesc/derby-hash.ttl?rev=1392021&r1=1392020&r2=1392021&view=diff
==============================================================================
--- jena/trunk/jena-sdb/testing/StoreDesc/derby-hash.ttl (original)
+++ jena/trunk/jena-sdb/testing/StoreDesc/derby-hash.ttl Sun Sep 30 12:53:51 2012
@@ -5,7 +5,7 @@
 
 _:c rdf:type sdb:SDBConnection ;
     sdb:sdbType        "derby" ;
-    sdb:sdbName        "DB/test2-hash" ;
+    sdb:sdbName        "target/Derby-test/derby-hash" ;
 #    sdb:driver         "org.apache.derby.jdbc.EmbeddedDriver" ;
     .
 

Modified: jena/trunk/jena-sdb/testing/StoreDesc/derby-index.ttl
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/testing/StoreDesc/derby-index.ttl?rev=1392021&r1=1392020&r2=1392021&view=diff
==============================================================================
--- jena/trunk/jena-sdb/testing/StoreDesc/derby-index.ttl (original)
+++ jena/trunk/jena-sdb/testing/StoreDesc/derby-index.ttl Sun Sep 30 12:53:51 2012
@@ -5,7 +5,7 @@
 
 _:c rdf:type sdb:SDBConnection ;
     sdb:sdbType        "derby" ;
-    sdb:sdbName        "DB/test2-index" ;
+    sdb:sdbName        "target/Derby-test/derby-index" ;
 #    sdb:driver         "org.apache.derby.jdbc.EmbeddedDriver" ;
     .
 

Modified: jena/trunk/jena-sdb/testing/StoreDescSimple/derby-layout1.ttl
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/testing/StoreDescSimple/derby-layout1.ttl?rev=1392021&r1=1392020&r2=1392021&view=diff
==============================================================================
--- jena/trunk/jena-sdb/testing/StoreDescSimple/derby-layout1.ttl (original)
+++ jena/trunk/jena-sdb/testing/StoreDescSimple/derby-layout1.ttl Sun Sep 30 12:53:51 2012
@@ -7,7 +7,7 @@
 
 _:c rdf:type sdb:SDBConnection ;
     sdb:sdbType        "derby" ;
-    sdb:sdbName        "DB/test1" ;
+    sdb:sdbName        "target/Derby-test/derby-simple" ;
 #    sdb:driver         "org.apache.derby.jdbc.EmbeddedDriver" ;
     .
 

Modified: jena/trunk/jena-sdb/testing/store-list-simple.ttl
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/testing/store-list-simple.ttl?rev=1392021&r1=1392020&r2=1392021&view=diff
==============================================================================
--- jena/trunk/jena-sdb/testing/store-list-simple.ttl (original)
+++ jena/trunk/jena-sdb/testing/store-list-simple.ttl Sun Sep 30 12:53:51 2012
@@ -13,10 +13,9 @@ _:x rdf:type sdb:StoreList ;
 ##       [ rdfs:label "H2/Simple" ;
 ##         sdb:description <StoreDescSimple/h2-layout1.ttl> ]
 
-##        [ rdfs:label "Derby/Simple" ;
-##          sdb:description <StoreDescSimple/derby-layout1.ttl> ]
+       [ rdfs:label "Derby/Simple" ;
+         sdb:description <StoreDescSimple/derby-layout1.ttl> ]
 
-# This is used for the maven testing.
        [ rdfs:label "HSQLDB/Simple" ;
          sdb:description <StoreDescSimple/hsqldb-layout1.ttl> ]
 

Modified: jena/trunk/jena-sdb/testing/store-list.ttl
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/testing/store-list.ttl?rev=1392021&r1=1392020&r2=1392021&view=diff
==============================================================================
--- jena/trunk/jena-sdb/testing/store-list.ttl (original)
+++ jena/trunk/jena-sdb/testing/store-list.ttl Sun Sep 30 12:53:51 2012
@@ -17,11 +17,11 @@ _:x rdf:type sdb:StoreList ;
 ##       [ rdfs:label "H2/Index" ;
 ##         sdb:description <StoreDesc/h2-index.ttl> ]
 
-##       [ rdfs:label "Derby/Hash" ;
-##         sdb:description <StoreDesc/derby-hash.ttl> ]
-## 
-##       [ rdfs:label "Derby/Index" ;
-##         sdb:description <StoreDesc/derby-index.ttl> ]
+      [ rdfs:label "Derby/Hash" ;
+        sdb:description <StoreDesc/derby-hash.ttl> ]
+
+      [ rdfs:label "Derby/Index" ;
+        sdb:description <StoreDesc/derby-index.ttl> ]
 
       [ rdfs:label "HSQLDB/Hash" ;
         sdb:description <StoreDesc/hsqldb-hash.ttl> ]