From c5e4c29e5968c6344e228529a3039c4073e4c30f Mon Sep 17 00:00:00 2001 From: "Stefan E. Funk" <funk@sub.uni-goettingen.de> Date: Mon, 27 May 2019 12:42:59 +0200 Subject: [PATCH] Added ns2: to test code. argl! --- .../textgrid/middleware/OaiPmhTextgridOnlineTests.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java index 61979ebf..b335f09d 100644 --- a/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java +++ b/oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java @@ -52,7 +52,7 @@ public class OaiPmhTextgridOnlineTests { // from /etc/dhrep/oaipmh/oaipmh.textgrid.properties and copy it to // /etc/dhrep/oaipmh/oaipmh.config on your local machine! private static String host = "http://localhost:8095/oaipmh/"; - // NOTE Use "mvn tomcat:run" here + // NOTE Use "mvn tomcat:run" here! // private static String host = "http://localhost:8080/oaipmh-webapp/"; // Time to wait between the single queries using resumption tokens in milliseconds. @@ -645,18 +645,18 @@ public class OaiPmhTextgridOnlineTests { // Count response objects at first. int recordCount = 0; - int i = res.indexOf("<" + recordOrHeader + ">", 0); + int i = res.indexOf("<ns2:" + recordOrHeader + ">", 0); while (i != -1) { recordCount++; i++; - i = res.indexOf("<" + recordOrHeader + ">", i); + i = res.indexOf("<ns2:" + recordOrHeader + ">", i); } System.out.println("\t" + theThreadName + " " + recordOrHeader + "s: " + recordCount); // Check if token tag is existing. - int tokStart = res.indexOf("<resumptionToken"); - int tokEnd = res.indexOf("</resumptionToken"); + int tokStart = res.indexOf("<ns2:resumptionToken"); + int tokEnd = res.indexOf("</ns2:resumptionToken"); if (tokStart == -1 && tokEnd == -1) { System.out.println("\t" + theThreadName + " token: no token"); -- GitLab