summaryrefslogtreecommitdiffstats
path: root/vespaclient-java
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@oath.com>2018-10-18 13:41:30 +0200
committerBjørn Christian Seime <bjorncs@oath.com>2018-10-18 13:41:30 +0200
commit51fb66888afee9a2b90094d814cafb4973bb7adc (patch)
tree4852eabcc8fa365799988c833ce00247f741e72e /vespaclient-java
parentca067257c0e64716b8d171e41e5f9147165555c2 (diff)
Add contructor intended for unit testing
Diffstat (limited to 'vespaclient-java')
-rw-r--r--vespaclient-java/src/main/java/com/yahoo/vespavisit/StdOutVisitorHandler.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/vespaclient-java/src/main/java/com/yahoo/vespavisit/StdOutVisitorHandler.java b/vespaclient-java/src/main/java/com/yahoo/vespavisit/StdOutVisitorHandler.java
index 33ff3dab9f5..d09c1536a7a 100644
--- a/vespaclient-java/src/main/java/com/yahoo/vespavisit/StdOutVisitorHandler.java
+++ b/vespaclient-java/src/main/java/com/yahoo/vespavisit/StdOutVisitorHandler.java
@@ -47,14 +47,20 @@ public class StdOutVisitorHandler extends VdsVisitHandler {
boolean showProgress, boolean showStatistics, boolean doStatistics,
boolean abortOnClusterDown, int processtime, boolean jsonOutput)
{
- super(showProgress, showStatistics, abortOnClusterDown);
+ this(printIds, indentXml, showProgress, showStatistics, doStatistics, abortOnClusterDown, processtime, jsonOutput, createStdOutPrintStream());
+ }
+ StdOutVisitorHandler(boolean printIds, boolean indentXml,
+ boolean showProgress, boolean showStatistics, boolean doStatistics,
+ boolean abortOnClusterDown, int processtime, boolean jsonOutput, PrintStream out)
+ {
+ super(showProgress, showStatistics, abortOnClusterDown);
this.printIds = printIds;
this.indentXml = indentXml;
this.processTimeMilliSecs = processtime;
this.jsonOutput = jsonOutput;
- this.out = createStdOutPrintStream();
- dataHandler = new DataHandler(doStatistics);
+ this.out = out;
+ this.dataHandler = new DataHandler(doStatistics);
}
private static PrintStream createStdOutPrintStream() {