diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-29 22:05:43 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-11-29 22:05:43 +0100 |
commit | 56c993fa8db83efcf7f37d7155156da2d3867e55 (patch) | |
tree | ebe1633d479e41b4bd0151265c37a69a09c7b381 /vespaclient-java | |
parent | 13984de4d6ab9120920c6c2c54aecb1ea9deee08 (diff) |
Use latest junit.
Diffstat (limited to 'vespaclient-java')
-rw-r--r-- | vespaclient-java/src/test/java/com/yahoo/vespa/feed/perf/FeederParamsTest.java (renamed from vespaclient-java/src/test/java/com/yahoo/vespa/perf/FeederParamsTest.java) | 15 | ||||
-rw-r--r-- | vespaclient-java/src/test/java/com/yahoo/vespa/feed/perf/SimpleFeederTest.java (renamed from vespaclient-java/src/test/java/com/yahoo/vespa/perf/SimpleFeederTest.java) | 17 | ||||
-rw-r--r-- | vespaclient-java/src/test/java/com/yahoo/vespa/feed/perf/SimpleServer.java (renamed from vespaclient-java/src/test/java/com/yahoo/vespa/perf/SimpleServer.java) | 0 |
3 files changed, 16 insertions, 16 deletions
diff --git a/vespaclient-java/src/test/java/com/yahoo/vespa/perf/FeederParamsTest.java b/vespaclient-java/src/test/java/com/yahoo/vespa/feed/perf/FeederParamsTest.java index fbb38083aad..a188cf3ce5b 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespa/perf/FeederParamsTest.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespa/feed/perf/FeederParamsTest.java @@ -3,23 +3,22 @@ package com.yahoo.vespa.feed.perf; import com.yahoo.messagebus.routing.Route; import org.apache.commons.cli.ParseException; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintStream; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author Simon Thoresen Hult diff --git a/vespaclient-java/src/test/java/com/yahoo/vespa/perf/SimpleFeederTest.java b/vespaclient-java/src/test/java/com/yahoo/vespa/feed/perf/SimpleFeederTest.java index 5380796086a..50030d2bc59 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespa/perf/SimpleFeederTest.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespa/feed/perf/SimpleFeederTest.java @@ -13,7 +13,7 @@ import com.yahoo.messagebus.MessageHandler; import com.yahoo.messagebus.Reply; import com.yahoo.messagebus.StaticThrottlePolicy; import com.yahoo.messagebus.ThrottlePolicy; -import org.junit.Test; +import org.junit.jupiter.api.Test; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -22,12 +22,13 @@ import java.io.InputStream; import java.io.PrintStream; import java.lang.reflect.Field; import java.nio.charset.StandardCharsets; -import java.util.Arrays; +import java.util.List; import java.util.regex.Pattern; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; + /** * @author Simon Thoresen Hult @@ -289,8 +290,8 @@ public class SimpleFeederTest { private static void assertFeed(FeederParams params, InputStream in, MessageHandler validator, String expectedErr, String expectedOut) throws Throwable { TestDriver driver = new TestDriver(params, in, validator); driver.run(); - assertMatches(expectedErr, new String(driver.err.toByteArray(), StandardCharsets.UTF_8)); - assertMatches(expectedOut, new String(driver.out.toByteArray(), StandardCharsets.UTF_8)); + assertMatches(expectedErr, driver.err.toString(StandardCharsets.UTF_8)); + assertMatches(expectedOut, driver.out.toString(StandardCharsets.UTF_8)); assertTrue(driver.close()); } @@ -314,7 +315,7 @@ public class SimpleFeederTest { server = new SimpleServer(CONFIG_DIR, validator); feeder = new SimpleFeeder(params.setConfigId("dir:" + CONFIG_DIR) .setStdErr(new PrintStream(err)) - .setInputStreams(Arrays.asList(in)) + .setInputStreams(List.of(in)) .setStdOut(new PrintStream(out))); } diff --git a/vespaclient-java/src/test/java/com/yahoo/vespa/perf/SimpleServer.java b/vespaclient-java/src/test/java/com/yahoo/vespa/feed/perf/SimpleServer.java index a458a59f997..a458a59f997 100644 --- a/vespaclient-java/src/test/java/com/yahoo/vespa/perf/SimpleServer.java +++ b/vespaclient-java/src/test/java/com/yahoo/vespa/feed/perf/SimpleServer.java |