From 91b72f34415149a8a95c634226978b8090b3253d Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Wed, 1 Oct 2014 21:41:36 +0000 Subject: [PATCH] fix test bug git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1628840 13f79535-47bb-0310-9956-ffa450edef68 --- .../lucene/index/TestBackwardsCompatibility.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java index c192eee72a2..8b542c223f5 100644 --- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java +++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java @@ -752,12 +752,6 @@ public class TestBackwardsCompatibility extends LuceneTestCase { reader.close(); } - private int compare(String name, String v) { - int v0 = Integer.parseInt(name.substring(0, 2)); - int v1 = Integer.parseInt(v); - return v0 - v1; - } - public void changeIndexWithAdds(Random random, Directory dir, Version nameVersion) throws IOException { // open writer IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(new MockAnalyzer(random)) @@ -1189,7 +1183,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase { // only use Log- or TieredMergePolicy, to make document addition predictable and not suddenly merge: MergePolicy mp = random().nextBoolean() ? newLogMergePolicy() : newTieredMergePolicy(); IndexWriterConfig iwc = new IndexWriterConfig(new MockAnalyzer(random())) - .setMergePolicy(mp).setCommitOnClose(false); + .setMergePolicy(mp); IndexWriter w = new IndexWriter(ramDir, iwc); // add few more docs: for(int j = 0; j < RANDOM_MULTIPLIER * random().nextInt(30); j++) { @@ -1206,7 +1200,7 @@ public class TestBackwardsCompatibility extends LuceneTestCase { // version) to single segment index MergePolicy mp = random().nextBoolean() ? newLogMergePolicy() : newTieredMergePolicy(); IndexWriterConfig iwc = new IndexWriterConfig(null) - .setMergePolicy(mp).setCommitOnClose(false); + .setMergePolicy(mp); IndexWriter w = new IndexWriter(dir, iwc); w.addIndexes(ramDir); try {