From ba299713239b95faac457ee156c3711261e64923 Mon Sep 17 00:00:00 2001 From: Nhat Date: Sat, 28 Oct 2017 12:54:59 -0400 Subject: [PATCH] test: updates DocsStats with totalSizeInBytes Relates https://github.com/elastic/elasticsearch/pull/27117 Original commit: elastic/x-pack-elasticsearch@9bf177d90bb92debdccb75dfcd7d0ca78979953b --- .../collector/indices/IndexStatsMonitoringDocTests.java | 2 +- .../collector/indices/IndicesStatsMonitoringDocTests.java | 2 +- .../monitoring/collector/node/NodeStatsMonitoringDocTests.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDocTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDocTests.java index ebd18eb0712..989c0ba9a79 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDocTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndexStatsMonitoringDocTests.java @@ -241,7 +241,7 @@ public class IndexStatsMonitoringDocTests extends BaseFilteredMonitoringDocTestC long iota = 0L; final CommonStats commonStats = new CommonStats(CommonStatsFlags.ALL); - commonStats.getDocs().add(new DocsStats(++iota, no)); + commonStats.getDocs().add(new DocsStats(++iota, no, randomNonNegativeLong())); commonStats.getFieldData().add(new FieldDataStats(++iota, ++iota, null)); commonStats.getMerge().add(no, no, no, ++iota, no, no, no, no, no, no); commonStats.getQueryCache().add(new QueryCacheStats(++iota, ++iota, ++iota, ++iota, no)); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDocTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDocTests.java index a688cfffebf..75acdde9d4f 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDocTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/indices/IndicesStatsMonitoringDocTests.java @@ -153,7 +153,7 @@ public class IndicesStatsMonitoringDocTests extends BaseFilteredMonitoringDocTes private CommonStats mockCommonStats() { final CommonStats commonStats = new CommonStats(CommonStatsFlags.ALL); - commonStats.getDocs().add(new DocsStats(1L, -1L)); + commonStats.getDocs().add(new DocsStats(1L, -1L, randomNonNegativeLong())); commonStats.getStore().add(new StoreStats(2L)); final IndexingStats.Stats indexingStats = new IndexingStats.Stats(3L, 4L, -1L, -1L, -1L, -1L, -1L, -1L, true, 5L); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDocTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDocTests.java index 7d8e17fb176..f581f7dd596 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDocTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/collector/node/NodeStatsMonitoringDocTests.java @@ -294,7 +294,7 @@ public class NodeStatsMonitoringDocTests extends BaseFilteredMonitoringDocTestCa // Indices final CommonStats indicesCommonStats = new CommonStats(CommonStatsFlags.ALL); - indicesCommonStats.getDocs().add(new DocsStats(++iota, no)); + indicesCommonStats.getDocs().add(new DocsStats(++iota, no, randomNonNegativeLong())); indicesCommonStats.getFieldData().add(new FieldDataStats(++iota, ++iota, null)); indicesCommonStats.getStore().add(new StoreStats(++iota));