diff options
author | gjoranv <gv@verizonmedia.com> | 2021-10-20 13:06:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 13:06:25 +0200 |
commit | 5ddd97e66ff98bd101f4e00fae3c2303bc06c132 (patch) | |
tree | 5c9d68982302531e25468e73862eda8a5911f0a5 | |
parent | dfb3afcea3ef248bbc2091a3c0b34373629a729a (diff) | |
parent | 78b40a7fdca63183442e2a498cda6ae04dd8f5a8 (diff) |
Merge pull request #19648 from vespa-engine/get-rid-of-commons-collections-3.0
Get rid of commons collections 3.0
3 files changed, 10 insertions, 10 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java index 5706851943e..2df7739e552 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java @@ -296,7 +296,7 @@ public class ApplicationHandlerTest { " \"ready\": {" + " \"bar\": {" + " \"readyMillis\": " + (now - 1000) + - " }," + + " }" + " }" + " }," + " \"foo\": {" + @@ -524,7 +524,7 @@ public class ApplicationHandlerTest { " \"ready\": {\n" + " \"bar\": {},\n" + " \"hax\": {}\n" + - " },\n" + + " }\n" + " },\n" + " \"moo\": {\n" + " \"pending\": {},\n" + diff --git a/testutil/pom.xml b/testutil/pom.xml index 26bb3056e2f..dc795a66dab 100644 --- a/testutil/pom.xml +++ b/testutil/pom.xml @@ -37,11 +37,6 @@ <scope>compile</scope> </dependency> <dependency> - <groupId>uk.co.datumedge</groupId> - <artifactId>hamcrest-json</artifactId> - <scope>compile</scope> - </dependency> - <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>compile</scope> diff --git a/testutil/src/main/java/com/yahoo/test/json/JsonTestHelper.java b/testutil/src/main/java/com/yahoo/test/json/JsonTestHelper.java index 08afb2fd95f..05532d2a504 100644 --- a/testutil/src/main/java/com/yahoo/test/json/JsonTestHelper.java +++ b/testutil/src/main/java/com/yahoo/test/json/JsonTestHelper.java @@ -5,11 +5,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Joiner; -import org.hamcrest.MatcherAssert; import java.io.UncheckedIOException; -import static uk.co.datumedge.hamcrest.json.SameJSONAs.sameJSONAs; +import static org.junit.Assert.assertEquals; /** * @author Vegard Sjonfjell @@ -29,7 +28,13 @@ public class JsonTestHelper { /** Structurally compare two JSON encoded strings */ public static void assertJsonEquals(String inputJson, String expectedJson) { - MatcherAssert.assertThat(inputJson, sameJSONAs(expectedJson)); + try { + JsonNode expected = mapper.readTree(expectedJson); + JsonNode actual = mapper.readTree(inputJson); + assertEquals(expected, actual); + } catch (JsonProcessingException e) { + throw new RuntimeException("Exception when comparing json strings." , e); + } } /** Structurally compare a {@link JsonNode} and a JSON string. */ |