From 65e57d5e52bc8189c120566c9bd67c1b71384b42 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Wed, 10 Feb 2021 17:08:30 +0100 Subject: Avoid duplication when generating config and add test --- .../java/com/yahoo/config/model/deploy/TestProperties.java | 9 ++++++++- .../clustercontroller/ClusterControllerContainerCluster.java | 11 ++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'config-model/src/main/java/com') diff --git a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java index bcf76c15fa2..397b11661e5 100644 --- a/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java +++ b/config-model/src/main/java/com/yahoo/config/model/deploy/TestProperties.java @@ -1,4 +1,4 @@ -// Copyright 2019 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.config.model.deploy; import com.google.common.collect.ImmutableList; @@ -53,6 +53,7 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea private boolean useBucketExecutorForLidSpaceCompact; private boolean enableFeedBlockInDistributor = false; private double maxDeadBytesRatio = 0.2; + private int clusterControllerMaxHeapSizeInMb = 512; @Override public ModelContext.FeatureFlags featureFlags() { return this; } @Override public boolean multitenant() { return multitenant; } @@ -88,6 +89,7 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea @Override public boolean useBucketExecutorForLidSpaceCompact() { return useBucketExecutorForLidSpaceCompact; } @Override public boolean enableFeedBlockInDistributor() { return enableFeedBlockInDistributor; } @Override public double maxDeadBytesRatio() { return maxDeadBytesRatio; } + @Override public int clusterControllerMaxHeapSizeInMb() { return clusterControllerMaxHeapSizeInMb; } public TestProperties setFeedConcurrency(double feedConcurrency) { this.feedConcurrency = feedConcurrency; @@ -202,6 +204,11 @@ public class TestProperties implements ModelContext.Properties, ModelContext.Fea return this; } + public TestProperties clusterControllerMaxHeapSizeInMb(int heapSize) { + clusterControllerMaxHeapSizeInMb = heapSize; + return this; + } + public static class Spec implements ConfigServerSpec { private final String hostName; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java index ab33c647d5f..4fc73de3b48 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/clustercontroller/ClusterControllerContainerCluster.java @@ -34,19 +34,12 @@ public class ClusterControllerContainerCluster extends ContainerCluster