sqlqlite default db
diff --git a/dependency-reduced-pom.xml b/dependency-reduced-pom.xml
index 917bfcb..e87f1cf 100644
--- a/dependency-reduced-pom.xml
+++ b/dependency-reduced-pom.xml
@@ -4,7 +4,7 @@
<groupId>de.ids_mannheim.korap</groupId>
<artifactId>Kustvakt-core</artifactId>
<name>Kustvakt core</name>
- <version>0.59.1</version>
+ <version>0.59.4</version>
<description>Kustvakt core, basic rest api for testing purposes and default
interfaces</description>
<build>
@@ -47,6 +47,13 @@
<groupId>com.googlecode.maven-java-formatter-plugin</groupId>
<artifactId>maven-java-formatter-plugin</artifactId>
<version>0.4</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>format</goal>
+ </goals>
+ </execution>
+ </executions>
<configuration>
<configFile>${project.basedir}/Format.xml</configFile>
<overrideConfigCompilerVersion>true</overrideConfigCompilerVersion>
@@ -81,7 +88,7 @@
<version>2.19.1</version>
<configuration>
<reuseForks>false</reuseForks>
- <forkCount>1</forkCount>
+ <forkCount>2</forkCount>
<threadCount>10</threadCount>
<excludes>
<exclude>**/*APITest.java</exclude>
diff --git a/pom.xml b/pom.xml
index 317b9e7..093c5a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -172,7 +172,7 @@
<version>2.19.1</version>
<configuration>
<reuseForks>false</reuseForks>
- <forkCount>1</forkCount>
+ <forkCount>2</forkCount>
<threadCount>10</threadCount>
<excludes>
diff --git a/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java b/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
index 6736cf5..7b3ec6a 100644
--- a/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
+++ b/src/main/java/de/ids_mannheim/korap/web/KustvaktBaseServer.java
@@ -93,7 +93,6 @@
}
}
System.out.println("Found boot loading interfaces: " + list);
- int track = list.size();
while (!list.isEmpty()) {
for (BootableBeanInterface iface : new ArrayList<>(list)) {
try {
diff --git a/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java b/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
index 187037b..227be22 100644
--- a/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
+++ b/src/test/java/de/ids_mannheim/korap/resource/rewrite/CollectionRewriteTest.java
@@ -79,7 +79,7 @@
JsonNode node = JsonUtils.readTree(handler.processQuery(result,
User.UserFactory.getUser("test_user")));
- System.out.println(node);
+
assertNotNull(node);
assertEquals(0, node.at("/collection/operands").size());
assertEquals("koral:rewrite", node.at("/collection/rewrites/0/@type")
@@ -192,7 +192,6 @@
String org = s.toJSON();
JsonNode node = JsonUtils.readTree(handler.processQuery(org,
User.UserFactory.getUser("test_user")));
- System.out.println(node);
assertNotNull(node);
assertEquals("koral:docGroup", node.at("/collection/@type").asText());
assertEquals(2, node.at("/collection/operands").size());
diff --git a/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java b/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java
index db7a860..b65a73f 100644
--- a/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java
+++ b/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyTest.java
@@ -8,6 +8,7 @@
import com.sun.jersey.test.framework.LowLevelAppDescriptor;
import com.sun.jersey.test.framework.WebAppDescriptor;
import com.sun.jersey.test.framework.spi.container.TestContainer;
+import com.sun.jersey.test.framework.spi.container.TestContainerException;
import com.sun.jersey.test.framework.spi.container.TestContainerFactory;
import com.sun.jersey.test.framework.spi.container.grizzly.GrizzlyTestContainerFactory;
import com.sun.jersey.test.framework.spi.container.grizzly.web.GrizzlyWebTestContainerFactory;
@@ -18,6 +19,7 @@
import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriBuilder;
+import java.net.BindException;
import java.net.URI;
/**
@@ -37,6 +39,9 @@
private static Client client;
private static String[] classPackages = null;
+ private static int PORT = 9000;
+ private static int PORT_IT = 1;
+
public static void addClass (Class<?> resourceClass) {
resourceConfig.getClasses().add(resourceClass);
@@ -87,7 +92,7 @@
}
- public static void initServer () {
+ public static void initServer (int port) {
AppDescriptor ad;
if (classPackages == null)
ad = new LowLevelAppDescriptor.Builder(resourceConfig).build();
@@ -103,7 +108,7 @@
}
testContainer = tcf.create(UriBuilder.fromUri("http://localhost/")
- .port(9998).build(), ad);
+ .port(port).build(), ad);
client = testContainer.getClient();
if (client == null) {
client = Client.create(ad.getClientConfig());
@@ -112,8 +117,14 @@
public static void startServer () {
- if (testContainer != null) {
- testContainer.start();
+ try {
+ if (testContainer != null) {
+ testContainer.start();
+ }
+ }
+ catch (TestContainerException e) {
+ initServer(PORT + PORT_IT++);
+ startServer();
}
}
@@ -144,7 +155,7 @@
@Before
public void startServerBeforeFirstTestRun () {
if (testContainer == null) {
- initServer();
+ initServer(PORT);
startServer();
}
}