mirror of https://github.com/apache/lucene.git
fix DirectUpdateHandlerOptimizeTest to pass on windows
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@672829 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a57d15799
commit
e31c9deb9f
|
@ -60,6 +60,7 @@ public class DirectUpdateHandlerOptimizeTest extends AbstractSolrTestCase {
|
||||||
|
|
||||||
CommitUpdateCommand cmtCmd = new CommitUpdateCommand(false);
|
CommitUpdateCommand cmtCmd = new CommitUpdateCommand(false);
|
||||||
updater.commit(cmtCmd);
|
updater.commit(cmtCmd);
|
||||||
|
updater.commit(cmtCmd); // commit twice to give systems such as windows a chance to delete the old files
|
||||||
|
|
||||||
String indexDir = core.getIndexDir();
|
String indexDir = core.getIndexDir();
|
||||||
assertNumSegments(indexDir, 500);
|
assertNumSegments(indexDir, 500);
|
||||||
|
@ -68,6 +69,7 @@ public class DirectUpdateHandlerOptimizeTest extends AbstractSolrTestCase {
|
||||||
cmtCmd = new CommitUpdateCommand(true);
|
cmtCmd = new CommitUpdateCommand(true);
|
||||||
cmtCmd.maxOptimizeSegments = 250;
|
cmtCmd.maxOptimizeSegments = 250;
|
||||||
updater.commit(cmtCmd);
|
updater.commit(cmtCmd);
|
||||||
|
updater.commit(cmtCmd);
|
||||||
assertNumSegments(indexDir, 250);
|
assertNumSegments(indexDir, 250);
|
||||||
|
|
||||||
cmtCmd.maxOptimizeSegments = -1;
|
cmtCmd.maxOptimizeSegments = -1;
|
||||||
|
@ -78,6 +80,7 @@ public class DirectUpdateHandlerOptimizeTest extends AbstractSolrTestCase {
|
||||||
}
|
}
|
||||||
cmtCmd.maxOptimizeSegments = 1;
|
cmtCmd.maxOptimizeSegments = 1;
|
||||||
updater.commit(cmtCmd);
|
updater.commit(cmtCmd);
|
||||||
|
updater.commit(cmtCmd);
|
||||||
assertNumSegments(indexDir, 1);
|
assertNumSegments(indexDir, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue