Fix pipe warning.
Change-Id: I0a61e5d4b4cf66d18f93676fa4f04edff31b55fd
diff --git a/core/src/main/java/de/ids_mannheim/korap/service/SearchService.java b/core/src/main/java/de/ids_mannheim/korap/service/SearchService.java
index 18a349c..28c526d 100644
--- a/core/src/main/java/de/ids_mannheim/korap/service/SearchService.java
+++ b/core/src/main/java/de/ids_mannheim/korap/service/SearchService.java
@@ -236,7 +236,7 @@
private String handlePipeError (String query, String url,
String message) throws KustvaktException {
- jlog.error("Failed running the pipe at " + url + ". Message: "+ message);
+ jlog.warn("Failed running the pipe at " + url + ". Message: "+ message);
Notifications n = new Notifications();
n.addWarning(StatusCodes.PIPE_FAILED,
diff --git a/full/Changes b/full/Changes
index 906cb47..b604b95 100644
--- a/full/Changes
+++ b/full/Changes
@@ -7,6 +7,8 @@
- Added database methods for storing query references (diewald)
04/12/2020
- Fix hibernate dialect for SQLite. (margaretha)
+04/12/2020
+ - Fix pipe warning. (margaretha)
# version 0.62.4
24/01/2020
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/BCryptTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/BCryptTest.java
new file mode 100644
index 0000000..ec8c85d
--- /dev/null
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/BCryptTest.java
@@ -0,0 +1,21 @@
+package de.ids_mannheim.korap.misc;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.mindrot.jbcrypt.BCrypt;
+
+public class BCryptTest {
+
+ @Test
+ public void testSalt () {
+ String salt = BCrypt.gensalt(8);
+ System.out.println(salt);
+
+ String plain = "secret";
+ String password = BCrypt.hashpw(plain, salt);
+ System.out.println(password);
+
+ assertTrue(BCrypt.checkpw(plain, password));
+ }
+}
diff --git a/lite/src/test/java/de/ids_mannheim/korap/web/service/TestDummyServices.java b/lite/src/test/java/de/ids_mannheim/korap/web/service/TestDummyServices.java
new file mode 100644
index 0000000..8e4e0d2
--- /dev/null
+++ b/lite/src/test/java/de/ids_mannheim/korap/web/service/TestDummyServices.java
@@ -0,0 +1,33 @@
+package de.ids_mannheim.korap.web.service;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.sun.jersey.api.client.ClientResponse;
+
+import de.ids_mannheim.korap.config.LiteJerseyTest;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.utils.JsonUtils;
+
+public class TestDummyServices extends LiteJerseyTest {
+
+ @Test
+ public void testGlemmService () throws KustvaktException {
+ ClientResponse response = resource().path(API_VERSION).path("test")
+ .path("glemm").post(ClientResponse.class);
+
+ assertEquals(ClientResponse.Status.OK.getStatusCode(),
+ response.getStatus());
+
+ String entity = response.getEntity(String.class);
+
+ JsonNode node = JsonUtils.readTree(entity);
+ assertEquals(2, node.at("/query/wrap/key").size());
+ node = node.at("/query/wrap/rewrites");
+ assertEquals("Glemm", node.at("/0/src").asText());
+ assertEquals("operation:override", node.at("/0/operation").asText());
+ assertEquals("key", node.at("/0/scope").asText());
+ }
+}
diff --git a/lite/src/test/resources/test-config.xml b/lite/src/test/resources/test-config.xml
index cda35c7..952d5d1 100644
--- a/lite/src/test/resources/test-config.xml
+++ b/lite/src/test/resources/test-config.xml
@@ -155,6 +155,8 @@
<bean id="searchController" class="de.ids_mannheim.korap.web.controller.SearchController" />
<bean id="statisticController"
class="de.ids_mannheim.korap.web.controller.StatisticController" />
+ <!-- <bean id="testController"
+ class="de.ids_mannheim.korap.test.TestController" /> -->
<!-- Services -->
<bean id="scopeService"