Skip to content

Commit

Permalink
LUCENE-7671 - fix TestBackwardsCompatibility#testUpgradeOldSingleSegm…
Browse files Browse the repository at this point in the history
…entIndexWithAdditions
  • Loading branch information
kelaban committed Apr 7, 2017
1 parent fc1bf43 commit b211742
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,10 @@ public void testUpgradeOldSingleSegmentIndexWithAdditions() throws Exception {
IndexWriterConfig iwc = new IndexWriterConfig(null)
.setMergePolicy(mp);
IndexWriter w = new IndexWriter(dir, iwc);
w.addIndexes(ramDir);
DirectoryReader ramDirReader = DirectoryReader.open(ramDir);
CodecReader[] readers = new CodecReader[ramDirReader.leaves().size()];
for(int i = 0; i < readers.length; ++i) { readers[i] = SlowCodecReaderWrapper.wrap(ramDirReader.leaves().get(i).reader()); }
w.addIndexes(readers);
try {
w.commit();
} finally {
Expand Down

0 comments on commit b211742

Please sign in to comment.