aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/vespa/model/container/xml/RoutingBuilderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/test/java/com/yahoo/vespa/model/container/xml/RoutingBuilderTest.java')
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/container/xml/RoutingBuilderTest.java39
1 files changed, 21 insertions, 18 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/RoutingBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/RoutingBuilderTest.java
index c78c4d617ea..58b9462978f 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/RoutingBuilderTest.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/RoutingBuilderTest.java
@@ -12,14 +12,14 @@ import com.yahoo.config.provision.RegionName;
import com.yahoo.config.provision.Zone;
import com.yahoo.vespa.model.container.ApplicationContainerCluster;
import com.yahoo.vespa.model.container.ApplicationContainer;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
import java.io.IOException;
import java.util.Arrays;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* @author mortent
@@ -27,20 +27,20 @@ import static org.junit.Assert.assertEquals;
public class RoutingBuilderTest extends ContainerModelBuilderTestBase {
@Test
- public void setsRotationActiveAccordingToDeploymentSpec() throws IOException, SAXException {
+ void setsRotationActiveAccordingToDeploymentSpec() throws IOException, SAXException {
Element clusterElem = DomBuilderTest.parse(
"<container id='default' version='1.0'><search /></container>");
String deploymentSpec = "<deployment>\n" +
- " <prod> \n" +
- " <region active='true'>us-north-1</region>\n" +
- " <parallel>\n" +
- " <region active='false'>us-north-2</region>\n" +
- " <region active='true'>us-north-3</region>\n" +
- " </parallel>\n" +
- " <region active='false'>us-north-4</region>\n" +
- " </prod>\n" +
- "</deployment>";
+ " <prod> \n" +
+ " <region active='true'>us-north-1</region>\n" +
+ " <parallel>\n" +
+ " <region active='false'>us-north-2</region>\n" +
+ " <region active='true'>us-north-3</region>\n" +
+ " </parallel>\n" +
+ " <region active='false'>us-north-4</region>\n" +
+ " </prod>\n" +
+ "</deployment>";
ApplicationPackage applicationPackage = new MockApplicationPackage.Builder()
.withDeploymentSpec(deploymentSpec)
@@ -49,18 +49,21 @@ public class RoutingBuilderTest extends ContainerModelBuilderTestBase {
for (String region : Arrays.asList("us-north-1", "us-north-3")) {
ApplicationContainer container = getContainer(applicationPackage, region, clusterElem);
- assertEquals("Region " + region + " is active", "true",
- container.getServicePropertyString("activeRotation"));
+ assertEquals("true",
+ container.getServicePropertyString("activeRotation"),
+ "Region " + region + " is active");
}
for (String region : Arrays.asList("us-north-2", "us-north-4")) {
ApplicationContainer container = getContainer(applicationPackage, region, clusterElem);
- assertEquals("Region " + region + " is inactive", "false",
- container.getServicePropertyString("activeRotation"));
+ assertEquals("false",
+ container.getServicePropertyString("activeRotation"),
+ "Region " + region + " is inactive");
}
ApplicationContainer container = getContainer(applicationPackage, "unknown", clusterElem);
- assertEquals("Unknown region is inactive", "false",
- container.getServicePropertyString("activeRotation"));
+ assertEquals("false",
+ container.getServicePropertyString("activeRotation"),
+ "Unknown region is inactive");
}