Tests: make sure that 2 segments are created in SearchCancellationTests
Otherwise, the test fails if forced merge kicks in.
This commit is contained in:
parent
9c3e4d6e22
commit
6fe3bd817b
|
@ -46,6 +46,7 @@ public class SearchCancellationTests extends ESTestCase {
|
||||||
public static void before() throws IOException {
|
public static void before() throws IOException {
|
||||||
dir = newDirectory();
|
dir = newDirectory();
|
||||||
RandomIndexWriter w = new RandomIndexWriter(random(), dir);
|
RandomIndexWriter w = new RandomIndexWriter(random(), dir);
|
||||||
|
w.setDoRandomForceMerge(false); // we need 2 segments
|
||||||
indexRandomDocuments(w, TestUtil.nextInt(random(), 2, 20));
|
indexRandomDocuments(w, TestUtil.nextInt(random(), 2, 20));
|
||||||
w.flush();
|
w.flush();
|
||||||
indexRandomDocuments(w, TestUtil.nextInt(random(), 1, 20));
|
indexRandomDocuments(w, TestUtil.nextInt(random(), 1, 20));
|
||||||
|
|
Loading…
Reference in New Issue