mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 06:46:10 +00:00
[TEST] Stabelize test - wait for yellow to ensure all primaries are allocated
This commit is contained in:
parent
7bcabf9481
commit
6d77a248fb
@ -320,7 +320,7 @@ public class RandomTests extends ElasticsearchIntegrationTest {
|
||||
createIndex("idx");
|
||||
final int value = randomIntBetween(0, 10);
|
||||
indexRandom(true, client().prepareIndex("idx", "type").setSource("f", value));
|
||||
|
||||
ensureYellow("idx"); // only one document let's make sure all shards have an active primary
|
||||
SearchResponse response = client().prepareSearch("idx")
|
||||
.addAggregation(filter("filter").filter(FilterBuilders.matchAllFilter())
|
||||
.subAggregation(range("range")
|
||||
@ -330,7 +330,7 @@ public class RandomTests extends ElasticsearchIntegrationTest {
|
||||
.subAggregation(sum("sum").field("f"))))
|
||||
.execute().actionGet();
|
||||
|
||||
assertSearchResponse(response);System.out.println(response);
|
||||
assertSearchResponse(response);
|
||||
|
||||
Filter filter = response.getAggregations().get("filter");
|
||||
assertNotNull(filter);
|
||||
|
Loading…
x
Reference in New Issue
Block a user