Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Aug 26, 2024
1 parent 6d9b7f9 commit a9587bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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\":{\"reason\":\"Failed to create query.\",\"type\":\"query_shard_exception\"},\"shard\":1,\"status\":\"Failed\"}],\"skipped\":1.0},\"_version\":3}";
"{\"_id\":\"id\",\"_index\":\"index\",\"_primary_term\":1,\"result\":\"created\",\"_seq_no\":2,\"_shards\":{\"failed\":1,\"failures\":[{\"index\":\"index\",\"node\":\"node\",\"reason\":{\"reason\":\"Failed to create query.\",\"type\":\"query_shard_exception\"},\"shard\":1,\"status\":\"Failed\"}],\"skipped\":1,\"successful\":1,\"total\":3},\"_version\":3}";
IndexResponse indexResponse = IndexResponse.of(
response -> response.result(Result.Created)
.index("index")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testMapProperty() {
.timedOut(false)
.build();

String json = "{\"took\":1,\"timed_out\":false,\"_shards\":{\"failed\":0.0,\"successful\":1.0,\"total\":1.0},"
String json = "{\"took\":1,\"timed_out\":false,\"_shards\":{\"failed\":0,\"successful\":1,\"total\":1},"
+ "\"hits\":{\"total\":{\"relation\":\"eq\",\"value\":0},\"hits\":[]},\"aggregations\":{\"avg#foo\":{\"value\":3.14}}}";

assertEquals(json, toJson(resp));
Expand Down Expand Up @@ -95,7 +95,7 @@ public void testAdditionalProperties() {
.timedOut(false)
.build();

String json = "{\"took\":1,\"timed_out\":false,\"_shards\":{\"failed\":0.0,\"successful\":1.0,\"total\":1.0},"
String json = "{\"took\":1,\"timed_out\":false,\"_shards\":{\"failed\":0,\"successful\":1,\"total\":1},"
+ "\"hits\":{\"total\":{\"relation\":\"eq\",\"value\":0},\"hits\":[]},"
+ "\"aggregations\":{\"sterms#foo\":{\"buckets\":["
+ "{\"avg#bar\":{\"value\":1.0},\"doc_count\":1,\"key\":\"key_1\"},"
Expand Down

0 comments on commit a9587bb

Please sign in to comment.