summaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java')
-rw-r--r--clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java21
1 files changed, 9 insertions, 12 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java
index b5ad82b6b0c..3c9fd069e14 100644
--- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java
+++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/hostinfo/HostInfoTest.java
@@ -1,7 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.core.hostinfo;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
@@ -13,10 +13,7 @@ import java.util.Map;
import java.util.Optional;
import java.util.TreeMap;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.*;
public class HostInfoTest {
@@ -29,7 +26,7 @@ public class HostInfoTest {
}
@Test
- public void testEmptyJson() {
+ void testEmptyJson() {
HostInfo hostInfo = HostInfo.createHostInfo("{}");
assertNull(hostInfo.getVtag().getVersionOrNull());
assertTrue(hostInfo.getDistributor().getStorageNodes().isEmpty());
@@ -39,13 +36,13 @@ public class HostInfoTest {
}
@Test
- public void testExtendedJson() throws IOException {
+ void testExtendedJson() throws IOException {
HostInfo hostInfo = HostInfo.createHostInfo(readDataFile("host_info.json"));
assertEquals("5.32.76", hostInfo.getVtag().getVersionOrNull());
}
@Test
- public void testFullSet() throws IOException {
+ void testFullSet() throws IOException {
HostInfo hostInfo = HostInfo.createHostInfo(readDataFile("host_info.json"));
List<StorageNode> storageNodeList = hostInfo.getDistributor().getStorageNodes();
assertEquals(2, storageNodeList.size());
@@ -59,8 +56,8 @@ public class HostInfoTest {
assertEquals(123, hostInfo.getClusterStateVersionOrNull().intValue());
assertEquals(Optional.of(129L), hostInfo.getMetrics()
- .getValueAt("vds.datastored.bucket_space.buckets_total", Map.of("bucketSpace", "default"))
- .map(Metrics.Value::getLast));
+ .getValueAt("vds.datastored.bucket_space.buckets_total", Map.of("bucketSpace", "default"))
+ .map(Metrics.Value::getLast));
assertEquals(Optional.of(0L),
hostInfo.getMetrics()
.getValueAt("vds.datastored.bucket_space.buckets_total", Map.of("bucketSpace", "global"))
@@ -75,7 +72,7 @@ public class HostInfoTest {
}
@Test
- public void testSpeed() throws Exception {
+ void testSpeed() throws Exception {
String json = readDataFile("slow_host_info.json");
long start = 0;
@@ -92,7 +89,7 @@ public class HostInfoTest {
}
@Test
- public void testSharedFile() throws Exception {
+ void testSharedFile() throws Exception {
String json = readDataFile("distributor.json");
HostInfo hostInfo = HostInfo.createHostInfo(json);