diff options
Diffstat (limited to 'clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingCheckerTest.java')
-rw-r--r-- | clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingCheckerTest.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingCheckerTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingCheckerTest.java index 304579cf75a..65e6e0c2a03 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingCheckerTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/AggregatedStatsMergePendingCheckerTest.java @@ -15,38 +15,37 @@ public class AggregatedStatsMergePendingCheckerTest { private final AggregatedClusterStats mockAggregatedStats = mock(AggregatedClusterStats.class); private final AggregatedStatsMergePendingChecker checker; - public Fixture(ContentClusterStatsBuilder builder, - boolean hasUpdatesFromAllDistributors, - double minMergeCompletionRatio) { + Fixture(ContentClusterStatsBuilder builder, + boolean hasUpdatesFromAllDistributors, + double minMergeCompletionRatio) { when(mockAggregatedStats.getStats()).thenReturn(builder.build()); when(mockAggregatedStats.hasUpdatesFromAllDistributors()).thenReturn(hasUpdatesFromAllDistributors); this.checker = new AggregatedStatsMergePendingChecker(mockAggregatedStats, minMergeCompletionRatio); } - public static Fixture fromBucketsPending(long bucketsPending) { + static Fixture fromBucketsPending(long bucketsPending) { return new Fixture(new ContentClusterStatsBuilder() .add(1, "default", 5, bucketsPending), true, 1.0); } - public static Fixture fromBucketsPending(long bucketsPending, - double minMergeCompletionRatio) { + static Fixture fromBucketsPending(long bucketsPending, double minMergeCompletionRatio) { return new Fixture(new ContentClusterStatsBuilder() .add(1, "default", 5, bucketsPending), true, minMergeCompletionRatio); } - public static Fixture fromInvalidBucketStats() { + static Fixture fromInvalidBucketStats() { return new Fixture(new ContentClusterStatsBuilder() .add(1, "default"), true, 1.0); } - public static Fixture fromIncompleteStats() { + static Fixture fromIncompleteStats() { return new Fixture(new ContentClusterStatsBuilder(), false, 1.0); } - public boolean mayHaveMergesPending(String bucketSpace, int contentNodeIndex) { + boolean mayHaveMergesPending(String bucketSpace, int contentNodeIndex) { return checker.mayHaveMergesPending(bucketSpace, contentNodeIndex); } |