Fixed Kustvakt-lite test configuration.
Change-Id: I6794e3a5c2d77ae50b549ca820afa16d9eb401ab
diff --git a/core/src/main/java/de/ids_mannheim/korap/server/KustvaktBaseServer.java b/core/src/main/java/de/ids_mannheim/korap/server/KustvaktBaseServer.java
index 2af1912..eb3a76b 100644
--- a/core/src/main/java/de/ids_mannheim/korap/server/KustvaktBaseServer.java
+++ b/core/src/main/java/de/ids_mannheim/korap/server/KustvaktBaseServer.java
@@ -96,7 +96,7 @@
RandomCodeGenerator random = new RandomCodeGenerator();
String shutdownToken = random.createRandomCode(config);
- ShutdownHandler shutdownHandler = new ShutdownHandler(shutdownToken,true,true);
+ ShutdownHandler shutdownHandler = new ShutdownHandler(shutdownToken,true,false);
FileOutputStream fos = new FileOutputStream(new File("shutdownToken"));
OutputStreamWriter writer =
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/JettyServerTest.java b/full/src/test/java/de/ids_mannheim/korap/web/JettyServerTest.java
index b4c5b09..30d47d2 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/JettyServerTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/JettyServerTest.java
@@ -6,8 +6,9 @@
import java.net.HttpURLConnection;
import java.net.URL;
-import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.HandlerList;
import org.eclipse.jetty.server.handler.ShutdownHandler;
import org.junit.BeforeClass;
@@ -21,10 +22,13 @@
@BeforeClass
public static void testServerStarts () throws Exception {
- Server server = new Server(8000);
+ Server server = new Server();
+ ServerConnector connector = new ServerConnector(server);
+ connector.setPort(8000);
+ server.setConnectors(new Connector[] { connector });
+
HandlerList handlers = new HandlerList();
- handlers.setHandlers(
- new Handler[] { new ShutdownHandler("secret", false, true) });
+ handlers.addHandler(new ShutdownHandler("secret", false, true));
server.setHandler(handlers);
server.start();
}
diff --git a/lite/pom.xml b/lite/pom.xml
index 6b9ae4f..e531c37 100644
--- a/lite/pom.xml
+++ b/lite/pom.xml
@@ -70,14 +70,12 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
- <useSystemClassLoader>false</useSystemClassLoader>
- <reuseForks>false</reuseForks>
- <forkCount>2</forkCount>
- <threadCount>4</threadCount>
- <argLine>-Xmx512m -XX:MaxPermSize=256m</argLine>
- <excludes>
- <exclude>**/VCReferenceTest.java</exclude>>
- </excludes>
+ <useSystemClassLoader>false</useSystemClassLoader>
+ <reuseForks>true</reuseForks>
+ <forkCount>1</forkCount>
+ <threadCount>5</threadCount>
+ <argLine>-Xmx512m -XX:MaxPermSize=256m
+ -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager</argLine>
</configuration>
</plugin>
<plugin>
diff --git a/lite/src/test/resources/test-config.xml b/lite/src/test/resources/test-config.xml
index abfb505..0efa471 100644
--- a/lite/src/test/resources/test-config.xml
+++ b/lite/src/test/resources/test-config.xml
@@ -65,8 +65,6 @@
<property name="suppressClose">
<value>true</value>
</property>
- <!--<property name="initialSize" value="2"/> -->
- <!--<property name="poolPreparedStatements" value="true"/> -->
</bean>
<bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate">