index another doc in test and flush to force merge
This commit is contained in:
parent
08db1fb292
commit
b99fca342f
|
@ -362,8 +362,12 @@ public class RobinEngineTests extends ElasticsearchTestCase {
|
||||||
|
|
||||||
waitForMerge.get().countDown();
|
waitForMerge.get().countDown();
|
||||||
|
|
||||||
|
index = new Engine.Index(null, newUid("4"), doc);
|
||||||
|
engine.index(index);
|
||||||
|
engine.flush(new Engine.Flush());
|
||||||
|
|
||||||
// now, optimize and wait for merges, see that we have no merge flag
|
// now, optimize and wait for merges, see that we have no merge flag
|
||||||
engine.optimize(new Engine.Optimize().maxNumSegments(1).waitForMerge(true));
|
engine.optimize(new Engine.Optimize().flush(true).maxNumSegments(1).waitForMerge(true));
|
||||||
|
|
||||||
for (Segment segment : engine.segments()) {
|
for (Segment segment : engine.segments()) {
|
||||||
assertThat(segment.getMergeId(), nullValue());
|
assertThat(segment.getMergeId(), nullValue());
|
||||||
|
|
Loading…
Reference in New Issue