Skip to content
Snippets Groups Projects
Commit c5e4c29e authored by Stefan E. Funk's avatar Stefan E. Funk
Browse files

Added ns2: to test code. argl!

parent 44308a54
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ public class OaiPmhTextgridOnlineTests { ...@@ -52,7 +52,7 @@ public class OaiPmhTextgridOnlineTests {
// from /etc/dhrep/oaipmh/oaipmh.textgrid.properties and copy it to // from /etc/dhrep/oaipmh/oaipmh.textgrid.properties and copy it to
// /etc/dhrep/oaipmh/oaipmh.config on your local machine! // /etc/dhrep/oaipmh/oaipmh.config on your local machine!
private static String host = "http://localhost:8095/oaipmh/"; 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/"; // private static String host = "http://localhost:8080/oaipmh-webapp/";
// Time to wait between the single queries using resumption tokens in milliseconds. // Time to wait between the single queries using resumption tokens in milliseconds.
...@@ -645,18 +645,18 @@ public class OaiPmhTextgridOnlineTests { ...@@ -645,18 +645,18 @@ public class OaiPmhTextgridOnlineTests {
// Count response objects at first. // Count response objects at first.
int recordCount = 0; int recordCount = 0;
int i = res.indexOf("<" + recordOrHeader + ">", 0); int i = res.indexOf("<ns2:" + recordOrHeader + ">", 0);
while (i != -1) { while (i != -1) {
recordCount++; recordCount++;
i++; i++;
i = res.indexOf("<" + recordOrHeader + ">", i); i = res.indexOf("<ns2:" + recordOrHeader + ">", i);
} }
System.out.println("\t" + theThreadName + " " + recordOrHeader + "s: " + recordCount); System.out.println("\t" + theThreadName + " " + recordOrHeader + "s: " + recordCount);
// Check if token tag is existing. // Check if token tag is existing.
int tokStart = res.indexOf("<resumptionToken"); int tokStart = res.indexOf("<ns2:resumptionToken");
int tokEnd = res.indexOf("</resumptionToken"); int tokEnd = res.indexOf("</ns2:resumptionToken");
if (tokStart == -1 && tokEnd == -1) { if (tokStart == -1 && tokEnd == -1) {
System.out.println("\t" + theThreadName + " token: no token"); System.out.println("\t" + theThreadName + " token: no token");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment