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:
Yonik Seeley 2008-06-30 17:29:05 +00:00
parent 3a57d15799
commit e31c9deb9f
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,7 @@ public class DirectUpdateHandlerOptimizeTest extends AbstractSolrTestCase {
CommitUpdateCommand cmtCmd = new CommitUpdateCommand(false);
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();
assertNumSegments(indexDir, 500);
@ -68,6 +69,7 @@ public class DirectUpdateHandlerOptimizeTest extends AbstractSolrTestCase {
cmtCmd = new CommitUpdateCommand(true);
cmtCmd.maxOptimizeSegments = 250;
updater.commit(cmtCmd);
updater.commit(cmtCmd);
assertNumSegments(indexDir, 250);
cmtCmd.maxOptimizeSegments = -1;
@ -78,6 +80,7 @@ public class DirectUpdateHandlerOptimizeTest extends AbstractSolrTestCase {
}
cmtCmd.maxOptimizeSegments = 1;
updater.commit(cmtCmd);
updater.commit(cmtCmd);
assertNumSegments(indexDir, 1);
}