diff options
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ContentNodeStatsTest.java')
-rw-r--r-- | clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ContentNodeStatsTest.java | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ContentNodeStatsTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ContentNodeStatsTest.java index 47d1970e4d6..d30de6f7954 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ContentNodeStatsTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/ContentNodeStatsTest.java @@ -1,18 +1,16 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.clustercontroller.core; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static com.yahoo.vespa.clustercontroller.core.ContentNodeStats.BucketSpaceStats; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.*; public class ContentNodeStatsTest { @Test - public void bucket_space_stats_can_transition_from_valid_to_invalid() { - BucketSpaceStats stats = BucketSpaceStats.of(5,1); + void bucket_space_stats_can_transition_from_valid_to_invalid() { + BucketSpaceStats stats = BucketSpaceStats.of(5, 1); assertTrue(stats.valid()); stats.merge(BucketSpaceStats.invalid(), 1); @@ -21,7 +19,7 @@ public class ContentNodeStatsTest { } @Test - public void bucket_space_stats_can_transition_from_invalid_to_valid() { + void bucket_space_stats_can_transition_from_invalid_to_valid() { BucketSpaceStats stats = BucketSpaceStats.invalid(); assertFalse(stats.valid()); @@ -33,7 +31,7 @@ public class ContentNodeStatsTest { } @Test - public void bucket_space_stats_tracks_multiple_layers_of_invalid() { + void bucket_space_stats_tracks_multiple_layers_of_invalid() { BucketSpaceStats stats = BucketSpaceStats.invalid(); stats.merge(BucketSpaceStats.invalid(), 1); assertFalse(stats.valid()); @@ -52,19 +50,19 @@ public class ContentNodeStatsTest { } @Test - public void invalid_bucket_space_stats_may_have_pending_buckets() { + void invalid_bucket_space_stats_may_have_pending_buckets() { assertTrue(BucketSpaceStats.invalid().mayHaveBucketsPending(1.0)); } @Test - public void bucket_space_stats_without_buckets_total_use_buckets_pending_to_calculate_may_have_buckets_pending() { + void bucket_space_stats_without_buckets_total_use_buckets_pending_to_calculate_may_have_buckets_pending() { assertTrue(BucketSpaceStats.of(0, 2).mayHaveBucketsPending(0.6)); assertTrue(BucketSpaceStats.of(0, 1).mayHaveBucketsPending(0.6)); assertFalse(BucketSpaceStats.of(0, 0).mayHaveBucketsPending(0.6)); } @Test - public void min_merge_completion_ratio_is_used_to_calculate_bucket_space_stats_may_have_buckets_pending() { + void min_merge_completion_ratio_is_used_to_calculate_bucket_space_stats_may_have_buckets_pending() { assertTrue(BucketSpaceStats.of(5, 6).mayHaveBucketsPending(0.6)); assertTrue(BucketSpaceStats.of(5, 5).mayHaveBucketsPending(0.6)); assertTrue(BucketSpaceStats.of(5, 4).mayHaveBucketsPending(0.6)); |