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 Dec 11, 2024
1 parent 4bb7ddb commit 908ba25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ java-client/bin
samples/bin

.DS_Store

.kotlin/
Original file line number Diff line number Diff line change
Expand Up @@ -148,30 +148,33 @@ public void testDataStream() throws IOException {
assertEquals(1, getAllDataStreamsResponse.dataStreams().size());

// get one data stream stats
DataStreamsStatsResponse dataStreamStatsResponse = javaClient().indices().dataStreamsStats(b -> b.name(dataStreamName).human(true));
// TODO: support the `human` global parameter on all requests
DataStreamsStatsResponse dataStreamStatsResponse = javaClient().indices()
.dataStreamsStats(b -> b.name(dataStreamName)/* .human(true) */);
assertNotNull(dataStreamStatsResponse.shards());
assertEquals(1, dataStreamStatsResponse.dataStreamCount());
assertEquals(1, dataStreamStatsResponse.backingIndices());
assertTrue(dataStreamStatsResponse.totalStoreSizeBytes() > 0L);
assertNotNull(dataStreamStatsResponse.totalStoreSize());
// assertNotNull(dataStreamStatsResponse.totalStoreSize());
assertEquals(1, dataStreamStatsResponse.dataStreams().size());
assertEquals(dataStreamName, dataStreamStatsResponse.dataStreams().get(0).dataStream());
assertEquals(1, dataStreamStatsResponse.dataStreams().get(0).backingIndices());
assertTrue(dataStreamStatsResponse.dataStreams().get(0).storeSizeBytes() > 0);
assertNotNull(dataStreamStatsResponse.dataStreams().get(0).storeSize());
// assertNotNull(dataStreamStatsResponse.dataStreams().get(0).storeSize());

// get all data streams stats
DataStreamsStatsResponse allDataStreamsStatsResponse = javaClient().indices().dataStreamsStats(b -> b.human(true));
// TODO: support the `human` global parameter on all requests
DataStreamsStatsResponse allDataStreamsStatsResponse = javaClient().indices().dataStreamsStats(b -> b/* .human(true) */);
assertNotNull(allDataStreamsStatsResponse.shards());
assertEquals(1, allDataStreamsStatsResponse.dataStreamCount());
assertEquals(1, allDataStreamsStatsResponse.backingIndices());
assertTrue(allDataStreamsStatsResponse.totalStoreSizeBytes() > 0L);
assertNotNull(allDataStreamsStatsResponse.totalStoreSize());
// assertNotNull(allDataStreamsStatsResponse.totalStoreSize());
assertEquals(1, allDataStreamsStatsResponse.dataStreams().size());
assertEquals(dataStreamName, allDataStreamsStatsResponse.dataStreams().get(0).dataStream());
assertEquals(1, allDataStreamsStatsResponse.dataStreams().get(0).backingIndices());
assertTrue(allDataStreamsStatsResponse.dataStreams().get(0).storeSizeBytes() > 0);
assertNotNull(allDataStreamsStatsResponse.dataStreams().get(0).storeSize());
// assertNotNull(allDataStreamsStatsResponse.dataStreams().get(0).storeSize());

// delete data stream
DeleteDataStreamResponse deleteDataStreamResponse = javaClient().indices().deleteDataStream(b -> b.name(namePattern));
Expand Down

0 comments on commit 908ba25

Please sign in to comment.