Skip to content

Commit c1f7284

Browse files
author
Christoph Büscher
authored
Fix SimpleValidateQueryIT#testExplainValidateQueryTwoNodes (#84296) (#84312)
Under rare circumstances the 10 documents the test indexes might land on only one shard, resulting in a different output for the validation query than expected. By adding fixed doc ids we can avoid this and also make the test more reproducable. Closes #84218
1 parent 0ca3678 commit c1f7284

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/src/internalClusterTest/java/org/elasticsearch/validate/SimpleValidateQueryIT.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,11 @@ public void testExplainValidateQueryTwoNodes() throws IOException {
183183
.actionGet();
184184

185185
for (int i = 0; i < 10; i++) {
186-
client().prepareIndex("test").setSource("foo", "text", "bar", i, "baz", "blort").execute().actionGet();
186+
client().prepareIndex("test")
187+
.setSource("foo", "text", "bar", i, "baz", "blort")
188+
.setId(Integer.toString(i))
189+
.execute()
190+
.actionGet();
187191
}
188192
refresh();
189193

0 commit comments

Comments
 (0)