mirror of https://github.com/apache/lucene.git
Tidy.
This commit is contained in:
parent
c081cfa0ba
commit
1930425ffa
|
@ -2372,10 +2372,13 @@ public class TestIndexWriter extends LuceneTestCase {
|
|||
|
||||
public void testHasUncommittedChanges() throws IOException {
|
||||
Directory dir = newDirectory();
|
||||
IndexWriter writer = new IndexWriter(dir,
|
||||
newIndexWriterConfig(new MockAnalyzer(random()))
|
||||
// Use a serial merge scheduler to avoid race conditions when checking for hasPendingMerges()
|
||||
.setMergeScheduler(new SerialMergeScheduler()));
|
||||
IndexWriter writer =
|
||||
new IndexWriter(
|
||||
dir,
|
||||
newIndexWriterConfig(new MockAnalyzer(random()))
|
||||
// Use a serial merge scheduler to avoid race conditions when checking for
|
||||
// hasPendingMerges()
|
||||
.setMergeScheduler(new SerialMergeScheduler()));
|
||||
assertTrue(
|
||||
writer.hasUncommittedChanges()); // this will be true because a commit will create an empty
|
||||
// index
|
||||
|
|
Loading…
Reference in New Issue