Add sqlite to tests

This commit is contained in:
Travis Burtrum 2018-05-15 21:56:43 -04:00
parent 2db37683d6
commit 1d6f71918c
4 changed files with 17 additions and 1 deletions

View File

@ -97,6 +97,13 @@
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.21.0.1</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>

View File

@ -48,6 +48,12 @@
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>

View File

@ -58,7 +58,7 @@ public class QueryMapperQmDao implements QmDao {
static {
Collection<Class<?>> no = new ArrayList<Class<?>>();
for(final String connectionClassName : new String[]{
"org.hsqldb.jdbc.JDBCConnection", "org.apache.derby.impl.jdbc.EmbedConnection"
"org.hsqldb.jdbc.JDBCConnection", "org.apache.derby.impl.jdbc.EmbedConnection", "org.sqlite.jdbc3.JDBC3Connection"
// h2 doesn't support this with java6 either...
/*IFJAVA6_START
, "org.h2.jdbc.JdbcConnection"

View File

@ -75,12 +75,15 @@ public class QueryMapperTest {
jUrls.add("jdbc:hsqldb:mem:testDB");
jUrls.add("jdbc:derby:memory:testDB;create=true");
jUrls.add("jdbc:h2:mem:testDB");
jUrls.add("jdbc:sqlite::memory:");
} else if(jdbcUrl.equals("hsql") || jdbcUrl.equals("hsqldb")) {
jUrls.add("jdbc:hsqldb:mem:testDB");
} else if(jdbcUrl.equals("derby")) {
jUrls.add("jdbc:derby:memory:testDB;create=true");
} else if(jdbcUrl.equals("h2")) {
jUrls.add("jdbc:h2:mem:testDB");
} else if(jdbcUrl.equals("sqlite")) {
jUrls.add("jdbc:sqlite::memory:");
} else {
jUrls.add(jdbcUrl);
}