diff options
author | Harald Musum <musum@yahooinc.com> | 2023-10-31 14:57:05 +0100 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2023-10-31 14:57:05 +0100 |
commit | 6572324794d105fcf24b5d98f7405b2aea48de0b (patch) | |
tree | e2b5db8f411363213ae2688292fd0da1fd790088 /configserver | |
parent | a06b9c56ec1d65e951b94473c49e746c736dc19c (diff) |
Minor cleanup
Diffstat (limited to 'configserver')
2 files changed, 4 insertions, 2 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployNodeAllocationTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployNodeAllocationTest.java index 44344b6d394..e45af84f6f0 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployNodeAllocationTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployNodeAllocationTest.java @@ -26,6 +26,7 @@ import java.util.Set; import java.util.stream.Collectors; import static com.yahoo.vespa.config.server.deploy.DeployTester.createHostedModelFactory; +import static java.math.BigDecimal.valueOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; @@ -79,7 +80,7 @@ public class HostedDeployNodeAllocationTest { tester.deployApp("src/test/apps/hosted/", new PrepareParams.Builder() .vespaVersion("7.3") .containerEndpoints(endpoints) - .quota(new Quota(Optional.of(4), Optional.of(0)))); + .quota(new Quota(Optional.of(4), Optional.of(valueOf(0))))); fail("Expected to get a QuotaExceededException"); } catch (QuotaExceededException e) { assertEquals("main: The resources used cost $1.02 but your quota is $0.00: Contact support to upgrade your plan.", e.getMessage()); diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClientTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClientTest.java index 867a958cbe3..7fcaae05224 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClientTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClientTest.java @@ -25,6 +25,7 @@ import java.util.Optional; import static com.yahoo.vespa.config.server.session.SessionData.APPLICATION_ID_PATH; import static com.yahoo.vespa.config.server.session.SessionData.SESSION_DATA_PATH; import static com.yahoo.vespa.config.server.zookeeper.ZKApplication.SESSIONSTATE_ZK_SUBPATH; +import static java.math.BigDecimal.valueOf; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -144,7 +145,7 @@ public class SessionZooKeeperClientTest { @Test public void require_quota_written_and_parsed() { - var quota = Optional.of(new Quota(Optional.of(23), Optional.of(32))); + var quota = Optional.of(new Quota(Optional.of(23), Optional.of(valueOf(32)))); var zkc = createSessionZKClient(4); zkc.writeQuota(quota); assertEquals(quota, zkc.readQuota()); |