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 /zkfacade/src/test | |
parent | a9775442179fd17067cd351051d803920c0d74fc (diff) |
Stick to junit for simple test.
Diffstat (limited to 'zkfacade/src/test')
-rw-r--r-- | zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java b/zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java index d428540f8c1..2bf40c4e2bb 100644 --- a/zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java +++ b/zkfacade/src/test/java/com/yahoo/vespa/curator/CuratorTest.java @@ -11,8 +11,7 @@ import org.junit.Test; import java.io.IOException; import java.util.Optional; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertEquals; /** * Sets up actual ZooKeeper servers and verifies we can talk to them. @@ -55,8 +54,8 @@ public class CuratorTest { @Test public void require_curator_is_created_from_config() { try (Curator curator = createCurator(createTestConfig())) { - assertThat(curator.zooKeeperEnsembleConnectionSpec(), is(spec1 + "," + spec2)); - assertThat(curator.zooKeeperEnsembleCount(), is(2)); + assertEquals(spec1 + "," + spec2, curator.zooKeeperEnsembleConnectionSpec()); + assertEquals(2, curator.zooKeeperEnsembleCount()); } } @@ -65,7 +64,7 @@ public class CuratorTest { ConfigserverConfig.Builder builder = new ConfigserverConfig.Builder(); builder.zookeeperserver(createZKBuilder(localhost, port1)); try (Curator curator = createCurator(new ConfigserverConfig(builder))) { - assertThat(curator.zooKeeperEnsembleCount(), is(1)); + assertEquals(1, curator.zooKeeperEnsembleCount()); } } @@ -82,7 +81,7 @@ public class CuratorTest { HostName.setHostNameForTestingOnly(localhostHostName); String localhostSpec = localhostHostName + ":" + localhostPort; - assertThat(Curator.createConnectionSpecForLocalhost(config), is(localhostSpec)); + assertEquals(localhostSpec, Curator.createConnectionSpecForLocalhost(config)); } private ConfigserverConfig createTestConfig() { |