diff options
Diffstat (limited to 'vespaclient-java/src/test/java/com/yahoo/vespafeeder/ProgressPrinterTest.java')
-rw-r--r-- | vespaclient-java/src/test/java/com/yahoo/vespafeeder/ProgressPrinterTest.java | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/vespaclient-java/src/test/java/com/yahoo/vespafeeder/ProgressPrinterTest.java b/vespaclient-java/src/test/java/com/yahoo/vespafeeder/ProgressPrinterTest.java index 495367ff4c3..2307e27b161 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespafeeder/ProgressPrinterTest.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespafeeder/ProgressPrinterTest.java @@ -2,7 +2,7 @@ package com.yahoo.vespafeeder; import com.yahoo.clientmetrics.RouteMetricSet; -import com.yahoo.concurrent.Timer; +import com.yahoo.concurrent.ManualTimer; import com.yahoo.documentapi.messagebus.protocol.DocumentIgnoredReply; import com.yahoo.documentapi.messagebus.protocol.PutDocumentMessage; import com.yahoo.documentapi.messagebus.protocol.UpdateDocumentMessage; @@ -16,17 +16,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; public class ProgressPrinterTest { - class DummyTimer implements Timer { - long ms; - - public long milliTime() { return ms; } - } - @Test void testSimple() { ByteArrayOutputStream output = new ByteArrayOutputStream(); - DummyTimer timer = new DummyTimer(); - timer.ms = 0; + ManualTimer timer = new ManualTimer(); ProgressPrinter printer = new ProgressPrinter(timer, new PrintStream(output)); RouteMetricSet metrics = new RouteMetricSet("foobar", printer); @@ -36,7 +29,7 @@ public class ProgressPrinterTest { metrics.addReply(reply); } - timer.ms = 1200; + timer.set(1200); { EmptyReply reply = new EmptyReply(); @@ -50,7 +43,7 @@ public class ProgressPrinterTest { metrics.addReply(reply); } - timer.ms = 2400; + timer.set(2400); { DocumentIgnoredReply reply = new DocumentIgnoredReply(); @@ -65,7 +58,7 @@ public class ProgressPrinterTest { metrics.addReply(reply); } - timer.ms = 62000; + timer.set(62000); { EmptyReply reply = new EmptyReply(); |