summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <tegge@oath.com>2018-11-02 12:51:49 +0000
committergjoranv <gv@oath.com>2019-01-21 15:09:25 +0100
commit3c5531d7cb6557bfea6dc6f1f0d77b96a0569b54 (patch)
tree7917de356e10ae22fd5c3bf8f458d5b179dcb95f
parent4a72ebb71e80068eb4ac87a8c3fe3dfc099ee4a9 (diff)
Switch default data format for vespa http client to json.
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java2
-rw-r--r--vespa-http-client/src/test/java/com/yahoo/vespa/http/client/config/FeedParamsTest.java2
-rw-r--r--vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnectionTest.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java
index 17b32929eac..4adf3912dbd 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/config/FeedParams.java
@@ -39,7 +39,7 @@ public final class FeedParams {
* Mutable class used to instantiate a {@link FeedParams}.
*/
public static final class Builder {
- private DataFormat dataFormat = DataFormat.XML_UTF8;
+ private DataFormat dataFormat = DataFormat.JSON_UTF8;
private long serverTimeout = TimeUnit.SECONDS.toMillis(180);
private long clientTimeout = TimeUnit.SECONDS.toMillis(20);
private String route = null;
diff --git a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/config/FeedParamsTest.java b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/config/FeedParamsTest.java
index f2dd9a44878..3af73dbf47a 100644
--- a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/config/FeedParamsTest.java
+++ b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/config/FeedParamsTest.java
@@ -20,7 +20,7 @@ public class FeedParamsTest {
public void testDefaults() {
FeedParams params = new FeedParams.Builder().build();
- assertThat(params.getDataFormat(), equalTo(FeedParams.DataFormat.XML_UTF8));
+ assertThat(params.getDataFormat(), equalTo(FeedParams.DataFormat.JSON_UTF8));
assertThat(params.getMaxChunkSizeBytes(), is(50 * 1024));
assertThat(params.getRoute(), nullValue());
assertThat(params.getServerTimeout(TimeUnit.SECONDS), is(180L));
diff --git a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnectionTest.java b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnectionTest.java
index 1e2d37884ef..fa14a276445 100644
--- a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnectionTest.java
+++ b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/core/communication/ApacheGatewayConnectionTest.java
@@ -192,7 +192,7 @@ public class ApacheGatewayConnectionTest {
@Test
public void testCompressedWriteOperations() throws Exception {
final Endpoint endpoint = Endpoint.create("hostname", 666, false);
- final FeedParams feedParams = new FeedParams.Builder().build();
+ final FeedParams feedParams = new FeedParams.Builder().setDataFormat(FeedParams.DataFormat.XML_UTF8).build();
final String clusterSpecificRoute = "";
final ConnectionParams connectionParams = new ConnectionParams.Builder()
.setUseCompression(true)