You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by rv...@apache.org on 2013/06/05 19:49:16 UTC
svn commit: r1489984 - in /jena/Experimental/jena-jdbc:
jena-jdbc-core/src/test/java/org/apache/jena/jdbc/
jena-jdbc-core/src/test/java/org/apache/jena/jdbc/results/
jena-jdbc-driver-bundle/ jena-jdbc-driver-bundle/src/test/java/
jena-jdbc-driver-mem/s...
Author: rvesse
Date: Wed Jun 5 17:49:16 2013
New Revision: 1489984
URL: http://svn.apache.org/r1489984
Log:
Rejig tests somewhat to make it easy to run everything from a single point in Eclipse
Added:
jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/TS_JdbcCore.java
jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/src/test/java/TS_JdbcDriverBundle.java
jena/Experimental/jena-jdbc/jena-jdbc-driver-mem/src/test/java/org/apache/jena/jdbc/mem/TS_JdbcDriverMem.java
jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/src/test/java/org/apache/jena/jdbc/remote/TS_JdbcDriverRemote.java
jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/src/test/java/org/apache/jena/jdbc/tdb/TS_JdbcDriverTdb.java
Modified:
jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/results/AbstractResultSetTests.java
jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/pom.xml
jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/pom.xml
jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/pom.xml
Added: jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/TS_JdbcCore.java
URL: http://svn.apache.org/viewvc/jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/TS_JdbcCore.java?rev=1489984&view=auto
==============================================================================
--- jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/TS_JdbcCore.java (added)
+++ jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/TS_JdbcCore.java Wed Jun 5 17:49:16 2013
@@ -0,0 +1,36 @@
+/**
+ * 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.apache.jena.jdbc;
+
+import org.apache.jena.jdbc.metadata.results.TestMetaResultSet;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * JDBC core suite
+ *
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ TestCompatibility.class,
+ TestMetaResultSet.class
+})
+public class TS_JdbcCore {
+
+}
Modified: jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/results/AbstractResultSetTests.java
URL: http://svn.apache.org/viewvc/jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/results/AbstractResultSetTests.java?rev=1489984&r1=1489983&r2=1489984&view=diff
==============================================================================
--- jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/results/AbstractResultSetTests.java (original)
+++ jena/Experimental/jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/results/AbstractResultSetTests.java Wed Jun 5 17:49:16 2013
@@ -30,6 +30,7 @@ import org.apache.jena.jdbc.results.meta
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
+import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -124,6 +125,17 @@ public abstract class AbstractResultSetT
ds.setDefaultModel(m);
}
}
+
+ /**
+ * Cleans up the datasets used for tests
+ */
+ @AfterClass
+ public static void globalTeardown() {
+ ds.close();
+ ds = null;
+ empty.close();
+ empty = null;
+ }
protected abstract ResultSet createResults(Dataset ds, String query) throws SQLException;
Modified: jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/pom.xml
URL: http://svn.apache.org/viewvc/jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/pom.xml?rev=1489984&r1=1489983&r2=1489984&view=diff
==============================================================================
--- jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/pom.xml (original)
+++ jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/pom.xml Wed Jun 5 17:49:16 2013
@@ -12,6 +12,15 @@
<properties>
<plugin.license.headerPath>${project.parent.basedir}</plugin.license.headerPath>
+ <!-- Note that we actually skip tests in this module because this module
+ simply bundles up the other modules BUT it contains a JUnit suite primarily
+ as a convenience for being able to perform code coverage analysis easily
+ on all the modules. This is essentially a compromise to work around the Eclipse
+ EMMA plugin having limited configurability and making it otherwise impossible
+ to easily analyse code coverage on a multi-module project short of running
+ the Emma plugin on your Jenkins server, however doing that loses the visual
+ benefit of being to see in Eclipse what code is not covered -->
+ <skipTests>true</skipTests>
</properties>
<dependencies>
@@ -30,6 +39,49 @@
<artifactId>jena-jdbc-driver-tdb</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
+
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-jdbc-driver-mem</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-jdbc-driver-remote</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-jdbc-driver-tdb</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-jdbc-core</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.jena</groupId>
+ <artifactId>jena-fuseki</artifactId>
+ <version>0.2.8-SNAPSHOT</version>
+ <classifier>tests</classifier>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
Added: jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/src/test/java/TS_JdbcDriverBundle.java
URL: http://svn.apache.org/viewvc/jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/src/test/java/TS_JdbcDriverBundle.java?rev=1489984&view=auto
==============================================================================
--- jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/src/test/java/TS_JdbcDriverBundle.java (added)
+++ jena/Experimental/jena-jdbc/jena-jdbc-driver-bundle/src/test/java/TS_JdbcDriverBundle.java Wed Jun 5 17:49:16 2013
@@ -0,0 +1,40 @@
+/**
+ * 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.
+ */
+
+import org.apache.jena.jdbc.TS_JdbcCore;
+import org.apache.jena.jdbc.mem.TS_JdbcDriverMem;
+import org.apache.jena.jdbc.remote.TS_JdbcDriverRemote;
+import org.apache.jena.jdbc.tdb.TS_JdbcDriverTdb;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test Suite for Jena JDBC
+ *
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ TS_JdbcCore.class,
+ TS_JdbcDriverMem.class,
+ TS_JdbcDriverTdb.class,
+ TS_JdbcDriverRemote.class
+
+})
+public class TS_JdbcDriverBundle {
+
+}
Added: jena/Experimental/jena-jdbc/jena-jdbc-driver-mem/src/test/java/org/apache/jena/jdbc/mem/TS_JdbcDriverMem.java
URL: http://svn.apache.org/viewvc/jena/Experimental/jena-jdbc/jena-jdbc-driver-mem/src/test/java/org/apache/jena/jdbc/mem/TS_JdbcDriverMem.java?rev=1489984&view=auto
==============================================================================
--- jena/Experimental/jena-jdbc/jena-jdbc-driver-mem/src/test/java/org/apache/jena/jdbc/mem/TS_JdbcDriverMem.java (added)
+++ jena/Experimental/jena-jdbc/jena-jdbc-driver-mem/src/test/java/org/apache/jena/jdbc/mem/TS_JdbcDriverMem.java Wed Jun 5 17:49:16 2013
@@ -0,0 +1,41 @@
+/**
+ * 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.apache.jena.jdbc.mem;
+
+import org.apache.jena.jdbc.mem.connections.TestDatasetConnection;
+import org.apache.jena.jdbc.mem.metadata.TestDatasetConnectionMetadata;
+import org.apache.jena.jdbc.mem.results.TestResultSets;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite for the Jena JDBC Mem Driver
+ *
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ TestMemDriver.class,
+ TestMemDriverWithLogging.class,
+ TestDatasetConnection.class,
+ TestDatasetConnectionMetadata.class,
+ TestResultSets.class
+})
+public class TS_JdbcDriverMem {
+
+}
Modified: jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/pom.xml
URL: http://svn.apache.org/viewvc/jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/pom.xml?rev=1489984&r1=1489983&r2=1489984&view=diff
==============================================================================
--- jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/pom.xml (original)
+++ jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/pom.xml Wed Jun 5 17:49:16 2013
@@ -48,4 +48,21 @@
<scope>test</scope>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
Added: jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/src/test/java/org/apache/jena/jdbc/remote/TS_JdbcDriverRemote.java
URL: http://svn.apache.org/viewvc/jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/src/test/java/org/apache/jena/jdbc/remote/TS_JdbcDriverRemote.java?rev=1489984&view=auto
==============================================================================
--- jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/src/test/java/org/apache/jena/jdbc/remote/TS_JdbcDriverRemote.java (added)
+++ jena/Experimental/jena-jdbc/jena-jdbc-driver-remote/src/test/java/org/apache/jena/jdbc/remote/TS_JdbcDriverRemote.java Wed Jun 5 17:49:16 2013
@@ -0,0 +1,47 @@
+/**
+ * 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.apache.jena.jdbc.remote;
+
+import org.apache.jena.jdbc.remote.connections.TestRemoteEndpointConnection;
+import org.apache.jena.jdbc.remote.connections.TestRemoteEndpointConnectionWithGraphUris;
+import org.apache.jena.jdbc.remote.connections.TestRemoteEndpointConnectionWithResultSetTypes;
+import org.apache.jena.jdbc.remote.metadata.TestRemoteConnectionMetadata;
+import org.apache.jena.jdbc.remote.results.TestRemoteEndpointResults;
+import org.apache.jena.jdbc.remote.results.TestRemoteEndpointResultsWithGraphUris;
+import org.apache.jena.jdbc.remote.results.TestRemoteEndpointResultsWithResultSetTypes;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test Suite for the Jena JDBC Remote Endpoint driver
+ *
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ TestRemoteEndpointDriver.class,
+ TestRemoteEndpointConnection.class,
+ TestRemoteEndpointConnectionWithGraphUris.class,
+ TestRemoteEndpointConnectionWithResultSetTypes.class,
+ TestRemoteConnectionMetadata.class,
+ TestRemoteEndpointResults.class,
+ TestRemoteEndpointResultsWithGraphUris.class,
+ TestRemoteEndpointResultsWithResultSetTypes.class
+})
+public class TS_JdbcDriverRemote {
+
+}
Modified: jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/pom.xml
URL: http://svn.apache.org/viewvc/jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/pom.xml?rev=1489984&r1=1489983&r2=1489984&view=diff
==============================================================================
--- jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/pom.xml (original)
+++ jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/pom.xml Wed Jun 5 17:49:16 2013
@@ -61,6 +61,19 @@
<argLine>-Xmx1G</argLine>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
\ No newline at end of file
Added: jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/src/test/java/org/apache/jena/jdbc/tdb/TS_JdbcDriverTdb.java
URL: http://svn.apache.org/viewvc/jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/src/test/java/org/apache/jena/jdbc/tdb/TS_JdbcDriverTdb.java?rev=1489984&view=auto
==============================================================================
--- jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/src/test/java/org/apache/jena/jdbc/tdb/TS_JdbcDriverTdb.java (added)
+++ jena/Experimental/jena-jdbc/jena-jdbc-driver-tdb/src/test/java/org/apache/jena/jdbc/tdb/TS_JdbcDriverTdb.java Wed Jun 5 17:49:16 2013
@@ -0,0 +1,43 @@
+/**
+ * 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.apache.jena.jdbc.tdb;
+
+import org.apache.jena.jdbc.tdb.connections.TestTdbDiskConnection;
+import org.apache.jena.jdbc.tdb.connections.TestTdbMemConnection;
+import org.apache.jena.jdbc.tdb.metadata.TestTdbConnectionMetadata;
+import org.apache.jena.jdbc.tdb.results.TestTdbDiskResultSets;
+import org.apache.jena.jdbc.tdb.results.TestTdbMemResultSets;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite for the Jena JDBC TDB driver
+ *
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ TestJenaJdbcTdbDriver.class,
+ TestTdbDiskConnection.class,
+ TestTdbMemConnection.class,
+ TestTdbConnectionMetadata.class,
+ TestTdbDiskResultSets.class,
+ TestTdbMemResultSets.class
+})
+public class TS_JdbcDriverTdb {
+
+}