From 591e352574691eba9a1f103812871558d42711d1 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Fri, 2 Aug 2024 15:25:09 +1200 Subject: [PATCH] Fix tests Signed-off-by: Thomas Farr --- .../client/opensearch/json/PlainJsonSerializableTest.java | 2 +- .../org/opensearch/client/opensearch/model/BehaviorsTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/json/PlainJsonSerializableTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/json/PlainJsonSerializableTest.java index 2f504c48fc..c0af29e51b 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/json/PlainJsonSerializableTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/json/PlainJsonSerializableTest.java @@ -23,7 +23,7 @@ public class PlainJsonSerializableTest extends Assert { public void testIndexResponse() { String expectedStringValue = - "{\"_id\":\"id\",\"_index\":\"index\",\"_primary_term\":1,\"result\":\"created\",\"_seq_no\":2,\"_shards\":{\"failed\":1.0,\"successful\":1.0,\"total\":3.0,\"failures\":[{\"index\":\"index\",\"node\":\"node\",\"reason\":{\"type\":\"query_shard_exception\",\"reason\":\"Failed to create query.\"},\"shard\":1,\"status\":\"Failed\"}],\"skipped\":1.0},\"_version\":3}"; + "{\"_id\":\"id\",\"_index\":\"index\",\"_primary_term\":1,\"result\":\"created\",\"_seq_no\":2,\"_shards\":{\"failed\":1.0,\"successful\":1.0,\"total\":3.0,\"failures\":[{\"index\":\"index\",\"node\":\"node\",\"reason\":{\"reason\":\"Failed to create query.\",\"type\":\"query_shard_exception\"},\"shard\":1,\"status\":\"Failed\"}],\"skipped\":1.0},\"_version\":3}"; IndexResponse indexResponse = IndexResponse.of( response -> response.result(Result.Created) .index("index") diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/model/BehaviorsTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/model/BehaviorsTest.java index cd10c73915..d79f2156af 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/model/BehaviorsTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/model/BehaviorsTest.java @@ -147,7 +147,7 @@ public void testAdditionalProperties() { .metadata(MapBuilder.of("index", JsonData.of("test"), "retries", JsonData.of(1))) .build(); - err = checkJsonRoundtrip(err, "{\"index\":\"test\",\"retries\":1,\"type\":\"Some type\",\"reason\":\"Some failure\"}"); + err = checkJsonRoundtrip(err, "{\"index\":\"test\",\"retries\":1,\"reason\":\"Some failure\",\"type\":\"Some type\"}"); assertEquals("Some failure", err.reason()); assertEquals(1, err.metadata().get("retries").to(int.class).intValue());