aboutsummaryrefslogtreecommitdiffstats
path: root/configserver/src/test/java/com/yahoo/vespa/config/server/application/ConfigConvergenceCheckerTest.java
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorn.christian@seime.no>2020-11-25 13:56:14 +0100
committerGitHub <noreply@github.com>2020-11-25 13:56:14 +0100
commit7f6172f425200fa41c9dbc08a5c183225e2e663c (patch)
tree9326faebdc0e54618e1040e88b565f7a905928a6 /configserver/src/test/java/com/yahoo/vespa/config/server/application/ConfigConvergenceCheckerTest.java
parent67cb7157535233e86b5c57db534ffbffeac4d20a (diff)
Revert "Revert "Bjorncs/config convergence checker preps""
Diffstat (limited to 'configserver/src/test/java/com/yahoo/vespa/config/server/application/ConfigConvergenceCheckerTest.java')
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/application/ConfigConvergenceCheckerTest.java17
1 files changed, 4 insertions, 13 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ConfigConvergenceCheckerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ConfigConvergenceCheckerTest.java
index 6aeb774d2b0..4b25c36a9d7 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ConfigConvergenceCheckerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ConfigConvergenceCheckerTest.java
@@ -2,15 +2,13 @@
package com.yahoo.vespa.config.server.application;
import com.github.tomakehurst.wiremock.junit.WireMockRule;
+import com.yahoo.component.Version;
import com.yahoo.config.model.api.Model;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.ApplicationName;
import com.yahoo.config.provision.InstanceName;
import com.yahoo.config.provision.TenantName;
-import com.yahoo.component.Version;
import com.yahoo.container.jdisc.HttpResponse;
-import com.yahoo.slime.Slime;
-import com.yahoo.slime.SlimeUtils;
import com.yahoo.vespa.config.server.ServerCache;
import com.yahoo.vespa.config.server.monitoring.MetricUpdater;
import org.junit.Before;
@@ -31,6 +29,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.get;
import static com.github.tomakehurst.wiremock.client.WireMock.okJson;
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options;
+import static com.yahoo.test.json.JsonTestHelper.assertJsonEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -202,16 +201,8 @@ public class ConfigConvergenceCheckerTest {
return uri.getHost() + ":" + uri.getPort();
}
- private static void assertResponse(String json, int status, HttpResponse response) {
- assertResponse((responseBody) -> {
- Slime expected = SlimeUtils.jsonToSlime(json.getBytes());
- Slime actual = SlimeUtils.jsonToSlime(responseBody.getBytes());
- try {
- assertEquals(new String((SlimeUtils.toJsonBytes(expected))), new String(SlimeUtils.toJsonBytes(actual)));
- } catch (IOException e) {
- throw new UncheckedIOException(e);
- }
- }, status, response);
+ private static void assertResponse(String expectedJson, int status, HttpResponse response) {
+ assertResponse((responseBody) -> assertJsonEquals(new String(responseBody.getBytes()), expectedJson), status, response);
}
private static void assertResponse(Consumer<String> assertFunc, int status, HttpResponse response) {