diff options
author | Vegard Sjonfjell <vegardsjo@gmail.com> | 2016-10-05 16:15:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-05 16:15:49 +0200 |
commit | e2ca1dab831acea34f47e9f9da1eb2d21d840f6b (patch) | |
tree | 824ce6d80728ad07acf21e36e17c1a50be3766fc /vespa-http-client | |
parent | 988a165429ef19b388e684faa712ffd9096cc559 (diff) |
Revert "Voffeloff/constant tensor validation"
Diffstat (limited to 'vespa-http-client')
-rw-r--r-- | vespa-http-client/pom.xml | 6 | ||||
-rw-r--r-- | vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java | 11 |
2 files changed, 10 insertions, 7 deletions
diff --git a/vespa-http-client/pom.xml b/vespa-http-client/pom.xml index 563e4406fe9..9e2325e8016 100644 --- a/vespa-http-client/pom.xml +++ b/vespa-http-client/pom.xml @@ -83,12 +83,6 @@ <artifactId>airline</artifactId> <version>0.6</version> </dependency> - <dependency> - <groupId>com.yahoo.vespa</groupId> - <artifactId>testutil</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> </dependencies> <build> <plugins> diff --git a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java index eba8791bbb7..ab7dca0d5fb 100644 --- a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java +++ b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/runner/JsonReaderTest.java @@ -1,6 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.http.client.runner; +import com.google.common.base.Joiner; import com.yahoo.vespa.http.client.FeedClient; import com.yahoo.vespa.http.client.core.JsonReader; import org.junit.Test; @@ -12,7 +13,6 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; -import static com.yahoo.test.json.JsonTestHelper.inputJson; import static org.hamcrest.core.Is.is; import static org.junit.Assert.*; @@ -260,4 +260,13 @@ public class JsonReaderTest { assertThat(session.documentIds.size(), is(1)); assertThat(session.documentIds.get(0), is("id:foo:music:doc:foo:bar")); } + + /** + * Convenience method to input JSON without escaping double quotes and newlines + * Each parameter represents a line of JSON encoded data + * The lines are joined with newline and single quotes are replaced with double quotes + */ + static String inputJson(String... lines) { + return Joiner.on("\n").join(lines).replaceAll("'", "\""); + } }
\ No newline at end of file |