aboutsummaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorØyvind Grønnesby <oyving@yahooinc.com>2023-11-02 14:33:49 +0100
committerGitHub <noreply@github.com>2023-11-02 14:33:49 +0100
commit78316354ce82d77d79a15e1f23c67b4546f39480 (patch)
tree2f71a75b83699b22c0eac5799c27b22fbcaba178 /configserver
parentff1f66d284015e03537c34b4dc2cd0d8eb530fbe (diff)
parent6572324794d105fcf24b5d98f7405b2aea48de0b (diff)
Merge pull request #29173 from vespa-engine/hmusum/minor-cleanup
Minor cleanup
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployNodeAllocationTest.java3
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionZooKeeperClientTest.java3
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());