diff options
Diffstat (limited to 'configserver/src/test')
-rw-r--r-- | configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java index afeb84c02b4..08cb5c92c1b 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/PrepareParamsTest.java @@ -1,10 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.config.server.session; +import com.yahoo.component.Version; import com.yahoo.config.provision.ApplicationId; import com.yahoo.config.provision.Rotation; import com.yahoo.config.provision.TenantName; -import com.yahoo.config.provision.Version; import com.yahoo.container.jdisc.HttpRequest; import org.junit.Test; @@ -28,8 +28,7 @@ public class PrepareParamsTest { @Test public void testCorrectParsing() { - PrepareParams prepareParams = createParams("http://foo:19071/application/v2/", - TenantName.defaultName()); + PrepareParams prepareParams = createParams("http://foo:19071/application/v2/", TenantName.defaultName()); assertThat(prepareParams.getApplicationId(), is(ApplicationId.defaultId())); assertFalse(prepareParams.isDryRun()); @@ -51,28 +50,28 @@ public class PrepareParamsTest { @Test public void testCorrectParsingWithRotation() { PrepareParams prepareParams = createParams(request + "&" + - PrepareParams.ROTATIONS_PARAM_NAME + "=" + rotation, - TenantName.from("foo")); + PrepareParams.ROTATIONS_PARAM_NAME + "=" + rotation, + TenantName.from("foo")); assertThat(prepareParams.getApplicationId().serializedForm(), is("foo:baz:default")); assertTrue(prepareParams.isDryRun()); assertFalse(prepareParams.ignoreValidationErrors()); - final Version expectedVersion = Version.fromString(vespaVersion); + Version expectedVersion = Version.fromString(vespaVersion); assertThat(prepareParams.vespaVersion().get(), is(expectedVersion)); assertTrue(prepareParams.getTimeoutBudget().hasTimeLeft()); - final Set<Rotation> rotations = prepareParams.rotations(); + Set<Rotation> rotations = prepareParams.rotations(); assertThat(rotations.size(), is(1)); assertThat(rotations, contains(equalTo(new Rotation(rotation)))); } @Test public void testCorrectParsingWithSeveralRotations() { - final String rotationTwo = "rotation-043.vespa.a02.yahoodns.net"; - final String twoRotations = rotation + "," + rotationTwo; + String rotationTwo = "rotation-043.vespa.a02.yahoodns.net"; + String twoRotations = rotation + "," + rotationTwo; PrepareParams prepareParams = createParams(request + "&" + - PrepareParams.ROTATIONS_PARAM_NAME + "=" + twoRotations, - TenantName.from("foo")); - final Set<Rotation> rotations = prepareParams.rotations(); + PrepareParams.ROTATIONS_PARAM_NAME + "=" + twoRotations, + TenantName.from("foo")); + Set<Rotation> rotations = prepareParams.rotations(); assertThat(rotations, containsInAnyOrder(new Rotation(rotation), new Rotation(rotationTwo))); } |