diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-08-11 21:19:39 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-08-11 21:19:39 +0000 |
commit | 9435133c1fe4ef65ec1d9fe1b9d90677b76bbcfe (patch) | |
tree | 7f6fa87d653b183821126df3e5ef4ded313b4db5 /zookeeper-server/zookeeper-server-common | |
parent | a9775442179fd17067cd351051d803920c0d74fc (diff) |
Stick to junit for simple test.
Diffstat (limited to 'zookeeper-server/zookeeper-server-common')
-rw-r--r-- | zookeeper-server/zookeeper-server-common/src/test/java/com/yahoo/vespa/zookeeper/ConfiguratorTest.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/zookeeper-server/zookeeper-server-common/src/test/java/com/yahoo/vespa/zookeeper/ConfiguratorTest.java b/zookeeper-server/zookeeper-server-common/src/test/java/com/yahoo/vespa/zookeeper/ConfiguratorTest.java index 74e21339022..3838b10d914 100644 --- a/zookeeper-server/zookeeper-server-common/src/test/java/com/yahoo/vespa/zookeeper/ConfiguratorTest.java +++ b/zookeeper-server/zookeeper-server-common/src/test/java/com/yahoo/vespa/zookeeper/ConfiguratorTest.java @@ -29,9 +29,8 @@ import static com.yahoo.security.SignatureAlgorithm.SHA256_WITH_ECDSA; import static com.yahoo.vespa.zookeeper.Configurator.ZOOKEEPER_JUTE_MAX_BUFFER; import static java.time.Instant.EPOCH; import static java.time.temporal.ChronoUnit.DAYS; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; import static com.yahoo.vespa.defaults.Defaults.getDefaults; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; /** @@ -140,12 +139,12 @@ public class ConfiguratorTest { builder.myidFile(idFile.getAbsolutePath()); new Configurator(builder.build()).writeConfigToDisk(Optional.empty()); - assertThat(System.getProperty(ZOOKEEPER_JUTE_MAX_BUFFER), is("" + new ZookeeperServerConfig(builder).juteMaxBuffer())); + assertEquals("" + new ZookeeperServerConfig(builder).juteMaxBuffer(), System.getProperty(ZOOKEEPER_JUTE_MAX_BUFFER)); final int max_buffer = 1; builder.juteMaxBuffer(max_buffer); new Configurator(builder.build()).writeConfigToDisk(Optional.empty()); - assertThat(System.getProperty(ZOOKEEPER_JUTE_MAX_BUFFER), is("" + max_buffer)); + assertEquals("" + max_buffer, System.getProperty(ZOOKEEPER_JUTE_MAX_BUFFER)); } private ZookeeperServerConfig.Server.Builder newServer(int id, String hostName, int electionPort, int quorumPort) { @@ -159,7 +158,7 @@ public class ConfiguratorTest { private void validateIdFile(File idFile, String expected) throws IOException { String actual = IOUtils.readFile(idFile); - assertThat(actual, is(expected)); + assertEquals(expected, actual); } private String commonConfig() { @@ -285,7 +284,7 @@ public class ConfiguratorTest { private void validateConfigFile(File cfgFile, String expected) throws IOException { String actual = IOUtils.readFile(cfgFile); - assertThat(actual, is(expected)); + assertEquals(expected, actual); } private void validateThatJksKeyStoreFileExists(File cfgFile) { |