lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rjer...@apache.org
Subject svn commit: r1617004 [5/11] - in /lucene/dev/trunk: lucene/ lucene/analysis/common/src/test/org/apache/lucene/analysis/core/ lucene/analysis/common/src/test/org/apache/lucene/analysis/miscellaneous/ lucene/analysis/common/src/test/org/apache/lucene/ana...
Date Sat, 09 Aug 2014 18:54:43 GMT
Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterNRTIsCurrent.java Sat Aug  9 18:54:35 2014
@@ -63,7 +63,7 @@ public class TestIndexWriterNRTIsCurrent
       }
     }
     assertFalse(failed);
-    writer.shutdown();
+    writer.close();
     dir.close();
 
   }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOnDiskFull.java Sat Aug  9 18:54:35 2014
@@ -100,7 +100,7 @@ public class TestIndexWriterOnDiskFull e
               if (VERBOSE) {
                 System.out.println("TEST: now close");
               }
-              writer.shutdown();
+              writer.close();
             } catch (IOException e) {
               if (VERBOSE) {
                 System.out.println("TEST: exception on close; retry w/ no disk space limit");
@@ -108,7 +108,7 @@ public class TestIndexWriterOnDiskFull e
               }
               dir.setMaxSizeInBytes(0);
               try {
-                writer.shutdown();
+                writer.close();
               } catch (AlreadyClosedException ace) {
                 // OK
               }
@@ -131,7 +131,7 @@ public class TestIndexWriterOnDiskFull e
         } else {
           //_TestUtil.syncConcurrentMerges(writer);
           dir.setMaxSizeInBytes(0);
-          writer.shutdown();
+          writer.close();
           dir.close();
           break;
         }
@@ -179,7 +179,7 @@ public class TestIndexWriterOnDiskFull e
       for(int j=0;j<25;j++) {
         addDocWithIndex(writer, 25*i+j);
       }
-      writer.shutdown();
+      writer.close();
       String[] files = dirs[i].listAll();
       for(int j=0;j<files.length;j++) {
         inputDiskUsage += dirs[i].fileLength(files[j]);
@@ -193,7 +193,7 @@ public class TestIndexWriterOnDiskFull e
     for(int j=0;j<START_COUNT;j++) {
       addDocWithIndex(writer, j);
     }
-    writer.shutdown();
+    writer.close();
     
     // Make sure starting index seems to be working properly:
     Term searchTerm = new Term("content", "aaa");        
@@ -444,7 +444,7 @@ public class TestIndexWriterOnDiskFull e
         dir.setRandomIOExceptionRate(0.0);
         dir.setRandomIOExceptionRateOnOpen(0.0);
         
-        writer.shutdown();
+        writer.close();
         
         // Wait for all BG threads to finish else
         // dir.close() will throw IOException because
@@ -524,7 +524,7 @@ public class TestIndexWriterOnDiskFull e
     TestUtil.checkIndex(dir);
     ftdm.clearDoFail();
     w.addDocument(doc);
-    w.shutdown();
+    w.close();
 
     dir.close();
   }
@@ -536,7 +536,8 @@ public class TestIndexWriterOnDiskFull e
     MockDirectoryWrapper dir = newMockDirectory();
     IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(new MockAnalyzer(random()))
                                                 .setMaxBufferedDocs(2)
-                                                .setMergeScheduler(new ConcurrentMergeScheduler()));
+                                                .setMergeScheduler(new ConcurrentMergeScheduler())
+                                                .setCommitOnClose(false));
     dir.setMaxSizeInBytes(Math.max(1, dir.getRecomputedActualSizeInBytes()));
     final Document doc = new Document();
     FieldType customType = new FieldType(TextField.TYPE_STORED);
@@ -553,9 +554,11 @@ public class TestIndexWriterOnDiskFull e
     } catch (IOException ioe) {
     }
     try {
-      writer.shutdown(false);
+      writer.commit();
       fail("did not hit disk full");
     } catch (IOException ioe) {
+    } finally {
+      writer.close();
     }
 
     // Make sure once disk space is avail again, we can

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfFileDescriptors.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfFileDescriptors.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfFileDescriptors.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfFileDescriptors.java Sat Aug  9 18:54:35 2014
@@ -84,7 +84,7 @@ public class TestIndexWriterOutOfFileDes
           w.addDocument(docs.nextDoc());
         }
         dir.setRandomIOExceptionRateOnOpen(0.0);
-        w.shutdown();
+        w.close();
         w = null;
 
         // NOTE: This is O(N^2)!  Only enable for temporary debugging:
@@ -143,7 +143,7 @@ public class TestIndexWriterOutOfFileDes
         // files ... we can easily have leftover files at
         // the time we take a copy because we are holding
         // open a reader:
-        new IndexWriter(dirCopy, newIndexWriterConfig(new MockAnalyzer(random()))).shutdown();
+        new IndexWriter(dirCopy, newIndexWriterConfig(new MockAnalyzer(random()))).close();
         dirCopy.setRandomIOExceptionRate(rate);
         dir.setRandomIOExceptionRateOnOpen(rate);
       }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterOutOfMemory.java Sat Aug  9 18:54:35 2014
@@ -232,7 +232,7 @@ public class TestIndexWriterOutOfMemory 
         }
         
         try {
-          iw.shutdown();
+          iw.close();
         } catch (OutOfMemoryError e) {
           if (e.getMessage() != null && e.getMessage().startsWith("Fake OutOfMemoryError")) {
             exceptionStream.println("\nTEST: got expected fake exc:" + e.getMessage());

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterReader.java Sat Aug  9 18:54:35 2014
@@ -102,14 +102,14 @@ public class TestIndexWriterReader exten
     DirectoryReader reader = writer.getReader();
     writer.commit(); // no changes that are not visible to the reader
     assertTrue(reader.isCurrent());
-    writer.shutdown();
+    writer.close();
     assertTrue(reader.isCurrent()); // all changes are visible to the reader
     iwc = newIndexWriterConfig(new MockAnalyzer(random()));
     writer = new IndexWriter(dir1, iwc);
     assertTrue(reader.isCurrent());
     writer.addDocument(DocHelper.createDocument(1, "x", 1+random().nextInt(5)));
     assertTrue(reader.isCurrent()); // segments in ram but IW is different to the readers one
-    writer.shutdown();
+    writer.close();
     assertFalse(reader.isCurrent()); // segments written
     reader.close();
     dir1.close();
@@ -157,7 +157,7 @@ public class TestIndexWriterReader exten
     
     r1.close();
     assertTrue(r2.isCurrent());
-    writer.shutdown();
+    writer.close();
     assertTrue(r2.isCurrent());
     
     DirectoryReader r3 = DirectoryReader.open(dir1);
@@ -173,7 +173,7 @@ public class TestIndexWriterReader exten
     assertTrue(r2.isCurrent());
     assertTrue(r3.isCurrent());
 
-    writer.shutdown();
+    writer.close();
 
     assertFalse(r2.isCurrent());
     assertTrue(!r3.isCurrent());
@@ -192,7 +192,7 @@ public class TestIndexWriterReader exten
     Document doc = new Document();
     doc.add(newTextField("field", "a b c", Field.Store.NO));
     writer.addDocument(doc);
-    writer.shutdown();
+    writer.close();
     
     iwc = newIndexWriterConfig(new MockAnalyzer(random()));
     writer = new IndexWriter(dir, iwc);
@@ -213,7 +213,7 @@ public class TestIndexWriterReader exten
     assertTrue(nrtReader.isCurrent()); // nothing was committed yet so we are still current
     assertEquals(2, nrtReader.maxDoc()); // sees the actual document added
     assertEquals(1, dirReader.maxDoc());
-    writer.shutdown(); // close is actually a commit both should see the changes
+    writer.close(); // close is actually a commit both should see the changes
     assertTrue(nrtReader.isCurrent()); 
     assertFalse(dirReader.isCurrent()); // this reader has been opened before the writer was closed / committed
     
@@ -245,7 +245,7 @@ public class TestIndexWriterReader exten
     Directory dir2 = newDirectory();
     IndexWriter writer2 = new IndexWriter(dir2, newIndexWriterConfig(new MockAnalyzer(random())));
     createIndexNoClose(!doFullMerge, "index2", writer2);
-    writer2.shutdown();
+    writer2.close();
 
     DirectoryReader r0 = writer.getReader();
     assertTrue(r0.isCurrent());
@@ -271,7 +271,7 @@ public class TestIndexWriterReader exten
     StoredDocument doc150 = r1.document(150);
     assertEquals("index2", doc150.get("indexname"));
     r1.close();
-    writer.shutdown();
+    writer.close();
     dir1.close();
     dir2.close();
   }
@@ -286,7 +286,7 @@ public class TestIndexWriterReader exten
     Directory dir2 = newDirectory();
     IndexWriter writer2 = new IndexWriter(dir2, newIndexWriterConfig(new MockAnalyzer(random())));
     createIndexNoClose(!doFullMerge, "index2", writer2);
-    writer2.shutdown();
+    writer2.close();
 
     writer.addIndexes(dir2);
     writer.addIndexes(dir2);
@@ -298,7 +298,7 @@ public class TestIndexWriterReader exten
     assertEquals(500, r1.maxDoc());
     
     r1.close();
-    writer.shutdown();
+    writer.close();
     dir1.close();
     dir2.close();
   }
@@ -344,14 +344,14 @@ public class TestIndexWriterReader exten
     r2.close();
     r3.close();
     r4.close();
-    writer.shutdown();
+    writer.close();
         
     // reopen the writer to verify the delete made it to the directory
     writer = new IndexWriter(dir1, newIndexWriterConfig(new MockAnalyzer(random())));
     IndexReader w2r1 = writer.getReader();
     assertEquals(0, count(new Term("id", id10), w2r1));
     w2r1.close();
-    writer.shutdown();
+    writer.close();
     dir1.close();
   }
 
@@ -413,7 +413,7 @@ public class TestIndexWriterReader exten
         writer.addDocument(doc);
       }
         
-      writer.shutdown();
+      writer.close();
       
       readers = new IndexReader[numDirs];
       for (int i = 0; i < numDirs; i++)
@@ -436,7 +436,7 @@ public class TestIndexWriterReader exten
       } else {
         mainWriter.abortMerges();
       }
-      mainWriter.shutdown();
+      mainWriter.close();
     }
 
     void closeDir() throws Throwable {
@@ -551,7 +551,7 @@ public class TestIndexWriterReader exten
     r2.close();
     r3.close();
     iwr2.close();
-    writer.shutdown();
+    writer.close();
 
     // test whether the changes made it to the directory
     writer = new IndexWriter(dir1, newIndexWriterConfig(new MockAnalyzer(random())));
@@ -559,7 +559,7 @@ public class TestIndexWriterReader exten
     // insure the deletes were actually flushed to the directory
     assertEquals(200, w2r1.maxDoc());
     w2r1.close();
-    writer.shutdown();
+    writer.close();
 
     dir1.close();
   }
@@ -575,8 +575,7 @@ public class TestIndexWriterReader exten
   
   public static void createIndex(Random random, Directory dir1, String indexName,
       boolean multiSegment) throws IOException {
-    IndexWriter w = new IndexWriter(dir1, LuceneTestCase.newIndexWriterConfig(random,
-        TEST_VERSION_CURRENT, new MockAnalyzer(random))
+    IndexWriter w = new IndexWriter(dir1, LuceneTestCase.newIndexWriterConfig(random, new MockAnalyzer(random))
         .setMergePolicy(new LogDocMergePolicy()));
     for (int i = 0; i < 100; i++) {
       w.addDocument(DocHelper.createDocument(i, indexName, 4));
@@ -584,7 +583,7 @@ public class TestIndexWriterReader exten
     if (!multiSegment) {
       w.forceMerge(1);
     }
-    w.shutdown();
+    w.close();
   }
 
   public static void createIndexNoClose(boolean multiSegment, String indexName,
@@ -640,7 +639,7 @@ public class TestIndexWriterReader exten
     writer.forceMerge(1);
     assertTrue(warmer.warmCount > count);
     
-    writer.shutdown();
+    writer.close();
     r1.close();
     dir1.close();
   }
@@ -672,7 +671,7 @@ public class TestIndexWriterReader exten
       r1 = r2;
     }
     assertEquals(110, r1.numDocs());
-    writer.shutdown();
+    writer.close();
     r1.close();
     dir1.close();
   }
@@ -686,7 +685,7 @@ public class TestIndexWriterReader exten
     createIndexNoClose(false, "test", writer);
 
     DirectoryReader r = writer.getReader();
-    writer.shutdown();
+    writer.close();
 
     TestUtil.checkIndex(dir1);
 
@@ -787,7 +786,7 @@ public class TestIndexWriterReader exten
       assertEquals("openDeleted=" + openDeletedFiles, 0, openDeletedFiles.size());
     }
 
-    writer.shutdown();
+    writer.close();
 
     dir1.close();
   }
@@ -876,7 +875,7 @@ public class TestIndexWriterReader exten
     assertTrue("no documents found at all", sum > 0);
 
     assertEquals(0, excs.size());
-    writer.shutdown();
+    writer.close();
 
     r.close();
     dir1.close();
@@ -898,7 +897,7 @@ public class TestIndexWriterReader exten
 
     IndexReader r = w.getReader();
     w.forceMergeDeletes();
-    w.shutdown();
+    w.close();
     r.close();
     r = DirectoryReader.open(dir);
     assertEquals(1, r.numDocs());
@@ -932,7 +931,7 @@ public class TestIndexWriterReader exten
     assertEquals(0, r.numDocs());
     r.close();
 
-    w.shutdown();
+    w.close();
     dir.close();
   }
   
@@ -943,7 +942,7 @@ public class TestIndexWriterReader exten
     IndexReader r = w.getReader();
     assertEquals(0, r.numDocs());
     r.close();
-    w.shutdown();
+    w.close();
     dir.close();
   }
 
@@ -973,7 +972,7 @@ public class TestIndexWriterReader exten
       w.addDocument(doc);
     }
     w.waitForMerges();
-    w.shutdown();
+    w.close();
     dir.close();
     assertTrue(didWarm.get());
   }
@@ -1013,7 +1012,7 @@ public class TestIndexWriterReader exten
       w.addDocument(doc);
     }
     w.waitForMerges();
-    w.shutdown();
+    w.close();
     dir.close();
     assertTrue(didWarm.get());
   }
@@ -1050,7 +1049,7 @@ public class TestIndexWriterReader exten
 
     r3.close();
 
-    w.shutdown();
+    w.close();
     d.close();
   }
   
@@ -1105,7 +1104,7 @@ public class TestIndexWriterReader exten
       }
     }
     
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
 
@@ -1115,7 +1114,7 @@ public class TestIndexWriterReader exten
     Directory dir = getAssertNoDeletesDirectory(newDirectory());
     // Don't use newIndexWriterConfig, because we need a
     // "sane" mergePolicy:
-    IndexWriterConfig iwc = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
+    IndexWriterConfig iwc = new IndexWriterConfig(new MockAnalyzer(random()));
     IndexWriter w = new IndexWriter(dir, iwc);
     // Create 500 segments:
     for(int i=0;i<500;i++) {
@@ -1127,7 +1126,7 @@ public class TestIndexWriterReader exten
       assertTrue(r.leaves().size() < 100);
       r.close();
     }
-    w.shutdown();
+    w.close();
     dir.close();
   }
 }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterThreadsToSegments.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterThreadsToSegments.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterThreadsToSegments.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterThreadsToSegments.java Sat Aug  9 18:54:35 2014
@@ -20,6 +20,7 @@ package org.apache.lucene.index;
 import java.io.Closeable;
 import java.io.IOException;
 import java.util.HashSet;
+import java.util.Random;
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.CyclicBarrier;
@@ -44,7 +45,7 @@ public class TestIndexWriterThreadsToSeg
   // doc NOT at the same time, and should have shared the same thread state / segment
   public void testSegmentCountOnFlushBasic() throws Exception {
     Directory dir = newDirectory();
-    final IndexWriter w = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())));
+    final IndexWriter w = new IndexWriter(dir, new IndexWriterConfig(new MockAnalyzer(random())));
     final CountDownLatch startingGun = new CountDownLatch(1);
     final CountDownLatch startDone = new CountDownLatch(2);
     final CountDownLatch middleGun = new CountDownLatch(1);
@@ -161,7 +162,7 @@ public class TestIndexWriterThreadsToSeg
   // iteration, and then verify that no more segments were flushed than number of threads:
   public void testSegmentCountOnFlushRandom() throws Exception {
     Directory dir = newFSDirectory(createTempDir());
-    IndexWriterConfig iwc = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
+    IndexWriterConfig iwc = new IndexWriterConfig(new MockAnalyzer(random()));
 
     int maxThreadStates = TestUtil.nextInt(random(), 1, 12);
 
@@ -237,7 +238,10 @@ public class TestIndexWriterThreadsToSeg
 
   public void testManyThreadsClose() throws Exception {
     Directory dir = newDirectory();
-    final RandomIndexWriter w = new RandomIndexWriter(random(), dir);
+    Random r = random();
+    IndexWriterConfig iwc = newIndexWriterConfig(r, new MockAnalyzer(r));
+    iwc.setCommitOnClose(false);
+    final RandomIndexWriter w = new RandomIndexWriter(r, dir, iwc);
     w.setDoRandomForceMerge(false);
     Thread[] threads = new Thread[TestUtil.nextInt(random(), 4, 30)];
     final CountDownLatch startingGun = new CountDownLatch(1);
@@ -274,7 +278,7 @@ public class TestIndexWriterThreadsToSeg
 
   public void testDocsStuckInRAMForever() throws Exception {
     Directory dir = newDirectory();
-    IndexWriterConfig iwc = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));
+    IndexWriterConfig iwc = new IndexWriterConfig(new MockAnalyzer(random()));
     iwc.setRAMBufferSizeMB(.2);
     Codec codec = Codec.forName("Lucene49");
     iwc.setCodec(codec);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterUnicode.java Sat Aug  9 18:54:35 2014
@@ -243,7 +243,7 @@ public class TestIndexWriterUnicode exte
     IndexReader r = w.getReader();
     assertEquals(1, r.docFreq(new Term("field", "a\uffffb")));
     r.close();
-    w.shutdown();
+    w.close();
     d.close();
   }
 
@@ -257,7 +257,7 @@ public class TestIndexWriterUnicode exte
     for(int i=0;i<count;i++)
       doc.add(newTextField("f" + i, utf8Data[2*i], Field.Store.YES));
     w.addDocument(doc);
-    w.shutdown();
+    w.close();
 
     IndexReader ir = DirectoryReader.open(dir);
     StoredDocument doc2 = ir.document(0);
@@ -331,7 +331,7 @@ public class TestIndexWriterUnicode exte
     checkTermsOrder(r, allTerms, true);
     r.close();
 
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
 }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java Sat Aug  9 18:54:35 2014
@@ -141,6 +141,7 @@ public class TestIndexWriterWithThreads 
             .setMaxBufferedDocs(2)
             .setMergeScheduler(new ConcurrentMergeScheduler())
             .setMergePolicy(newLogMergePolicy(4))
+            .setCommitOnClose(false)
       );
       ((ConcurrentMergeScheduler) writer.getConfig().getMergeScheduler()).setSuppressExceptions();
       dir.setMaxSizeInBytes(4*1024+20*iter);
@@ -163,7 +164,11 @@ public class TestIndexWriterWithThreads 
       // Make sure once disk space is avail again, we can
       // cleanly close:
       dir.setMaxSizeInBytes(0);
-      writer.shutdown(false);
+      try {
+        writer.commit();
+      } finally {
+        writer.close();
+      }
       dir.close();
     }
   }
@@ -188,6 +193,7 @@ public class TestIndexWriterWithThreads 
             .setMaxBufferedDocs(10)
             .setMergeScheduler(new ConcurrentMergeScheduler())
             .setMergePolicy(newLogMergePolicy(4))
+            .setCommitOnClose(false)
       );
       ((ConcurrentMergeScheduler) writer.getConfig().getMergeScheduler()).setSuppressExceptions();
 
@@ -215,7 +221,11 @@ public class TestIndexWriterWithThreads 
       if (VERBOSE) {
         System.out.println("\nTEST: now close");
       }
-      writer.shutdown(false);
+      try {
+        writer.commit();
+      } finally {
+        writer.close();
+      }
 
       // Make sure threads that are adding docs are not hung:
       for(int i=0;i<NUM_THREADS;i++) {
@@ -263,6 +273,7 @@ public class TestIndexWriterWithThreads 
              .setMaxBufferedDocs(2)
              .setMergeScheduler(new ConcurrentMergeScheduler())
              .setMergePolicy(newLogMergePolicy(4))
+             .setCommitOnClose(false)
       );
       ((ConcurrentMergeScheduler) writer.getConfig().getMergeScheduler()).setSuppressExceptions();
 
@@ -286,11 +297,12 @@ public class TestIndexWriterWithThreads 
 
       boolean success = false;
       try {
-        writer.shutdown(false);
+        writer.commit();
+        writer.close();
         success = true;
       } catch (IOException ioe) {
+        writer.rollback();
         failure.clearDoFail();
-        writer.close();
       }
       if (VERBOSE) {
         System.out.println("TEST: success=" + success);
@@ -319,7 +331,8 @@ public class TestIndexWriterWithThreads 
 
     IndexWriter writer = new IndexWriter(dir, newIndexWriterConfig(new MockAnalyzer(random()))
                                                 .setMaxBufferedDocs(2)
-                                                .setMergeScheduler(new ConcurrentMergeScheduler()));
+                                                .setMergeScheduler(new ConcurrentMergeScheduler())
+                                                .setCommitOnClose(false));
     final Document doc = new Document();
     FieldType customType = new FieldType(TextField.TYPE_STORED);
     customType.setStoreTermVectors(true);
@@ -341,7 +354,11 @@ public class TestIndexWriterWithThreads 
     }
     failure.clearDoFail();
     writer.addDocument(doc);
-    writer.shutdown(false);
+    try {
+      writer.commit();
+    } finally {
+      writer.close();
+    }
     dir.close();
   }
 
@@ -528,7 +545,7 @@ public class TestIndexWriterWithThreads 
         iwConstructed.countDown();
         startIndexing.await();
         writer.addDocument(doc);
-        writer.shutdown();
+        writer.close();
       } catch (Throwable e) {
         failed = true;
         failure = e;
@@ -630,7 +647,7 @@ public class TestIndexWriterWithThreads 
     }
 
     assertTrue(!failed.get());
-    writerRef.get().shutdown();
+    writerRef.get().close();
     d.close();
   }
 }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexableField.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexableField.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexableField.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIndexableField.java Sat Aug  9 18:54:35 2014
@@ -283,7 +283,7 @@ public class TestIndexableField extends 
     }
 
     final IndexReader r = w.getReader();
-    w.shutdown();
+    w.close();
 
     final IndexSearcher s = newSearcher(r);
     int counter = 0;

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIsCurrent.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIsCurrent.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIsCurrent.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestIsCurrent.java Sat Aug  9 18:54:35 2014
@@ -50,7 +50,7 @@ public class TestIsCurrent extends Lucen
   @Override
   public void tearDown() throws Exception {
     super.tearDown();
-    writer.shutdown();
+    writer.close();
     directory.close();
   }
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLazyProxSkipping.java Sat Aug  9 18:54:35 2014
@@ -102,7 +102,7 @@ public class TestLazyProxSkipping extend
         
         // make sure the index has only a single segment
         writer.forceMerge(1);
-        writer.shutdown();
+        writer.close();
 
       SegmentReader reader = getOnlySegmentReader(DirectoryReader.open(directory));
 
@@ -151,7 +151,7 @@ public class TestLazyProxSkipping extend
             writer.addDocument(doc);
         }
         
-        writer.shutdown();
+        writer.close();
         IndexReader reader = DirectoryReader.open(directory);
 
         DocsAndPositionsEnum tp = MultiFields.getTermPositionsEnum(reader,

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLongPostings.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLongPostings.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLongPostings.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestLongPostings.java Sat Aug  9 18:54:35 2014
@@ -34,7 +34,6 @@ import org.apache.lucene.util.LuceneTest
 import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
 import org.apache.lucene.util.FixedBitSet;
 import org.apache.lucene.util.TestUtil;
-import org.apache.lucene.util.TestUtil;
 
 @SuppressCodecs({ "SimpleText", "Memory", "Direct" })
 public class TestLongPostings extends LuceneTestCase {
@@ -128,7 +127,7 @@ public class TestLongPostings extends Lu
     }
 
     r = riw.getReader();
-    riw.shutdown();
+    riw.close();
 
     /*
     if (VERBOSE) {
@@ -328,7 +327,7 @@ public class TestLongPostings extends Lu
       }
 
       r = riw.getReader();
-      riw.shutdown();
+      riw.close();
     } else {
       r = DirectoryReader.open(dir);
     }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMaxTermFrequency.java Sat Aug  9 18:54:35 2014
@@ -57,7 +57,7 @@ public class TestMaxTermFrequency extend
       writer.addDocument(doc);
     }
     reader = writer.getReader();
-    writer.shutdown();
+    writer.close();
   }
   
   @Override

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedCodecs.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedCodecs.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedCodecs.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedCodecs.java Sat Aug  9 18:54:35 2014
@@ -53,7 +53,7 @@ public class TestMixedCodecs extends Luc
           iwc.setCodec(Codec.forName("SimpleText"));
         }
         if (w != null) {
-          w.shutdown();
+          w.close();
         }
         w = new RandomIndexWriter(random(), dir, iwc);
         docsLeftInThisSegment = TestUtil.nextInt(random(), 10, 100);
@@ -84,7 +84,7 @@ public class TestMixedCodecs extends Luc
       }
     }
 
-    w.shutdown();
+    w.close();
     dir.close();
   }
 }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMixedDocValuesUpdates.java Sat Aug  9 18:54:35 2014
@@ -149,7 +149,7 @@ public class TestMixedDocValuesUpdates e
 //      System.out.println();
     }
     
-    writer.shutdown();
+    writer.close();
     IOUtils.close(reader, dir);
   }
   
@@ -257,7 +257,7 @@ public class TestMixedDocValuesUpdates e
     
     for (Thread t : threads) t.start();
     done.await();
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader reader = DirectoryReader.open(dir);
     BytesRef scratch = new BytesRef();
@@ -322,7 +322,7 @@ public class TestMixedDocValuesUpdates e
       }
       reader.close();
     }
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
 
@@ -376,7 +376,7 @@ public class TestMixedDocValuesUpdates e
           new NumericDocValuesField("cf"+field, value*2));
     }
 
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader reader = DirectoryReader.open(dir);
     for (AtomicReaderContext context : reader.leaves()) {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiDocValues.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiDocValues.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiDocValues.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiDocValues.java Sat Aug  9 18:54:35 2014
@@ -31,7 +31,6 @@ import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.lucene.util.TestUtil;
-import org.apache.lucene.util.TestUtil;
 
 /** Tests MultiDocValues versus ordinary segment merging */
 public class TestMultiDocValues extends LuceneTestCase {
@@ -42,7 +41,7 @@ public class TestMultiDocValues extends 
     Field field = new NumericDocValuesField("numbers", 0);
     doc.add(field);
     
-    IndexWriterConfig iwc = newIndexWriterConfig(random(), TEST_VERSION_CURRENT, null);
+    IndexWriterConfig iwc = newIndexWriterConfig(random(), null);
     iwc.setMergePolicy(newLogMergePolicy());
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
 
@@ -58,7 +57,7 @@ public class TestMultiDocValues extends 
     iw.forceMerge(1);
     DirectoryReader ir2 = iw.getReader();
     AtomicReader merged = getOnlySegmentReader(ir2);
-    iw.shutdown();
+    iw.close();
     
     NumericDocValues multi = MultiDocValues.getNumericValues(ir, "numbers");
     NumericDocValues single = merged.getNumericDocValues("numbers");
@@ -77,7 +76,7 @@ public class TestMultiDocValues extends 
     Field field = new BinaryDocValuesField("bytes", ref);
     doc.add(field);
     
-    IndexWriterConfig iwc = newIndexWriterConfig(random(), TEST_VERSION_CURRENT, null);
+    IndexWriterConfig iwc = newIndexWriterConfig(random(), null);
     iwc.setMergePolicy(newLogMergePolicy());
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
 
@@ -93,7 +92,7 @@ public class TestMultiDocValues extends 
     iw.forceMerge(1);
     DirectoryReader ir2 = iw.getReader();
     AtomicReader merged = getOnlySegmentReader(ir2);
-    iw.shutdown();
+    iw.close();
     
     BinaryDocValues multi = MultiDocValues.getBinaryValues(ir, "bytes");
     BinaryDocValues single = merged.getBinaryDocValues("bytes");
@@ -114,7 +113,7 @@ public class TestMultiDocValues extends 
     Field field = new SortedDocValuesField("bytes", ref);
     doc.add(field);
     
-    IndexWriterConfig iwc = newIndexWriterConfig(random(), TEST_VERSION_CURRENT, null);
+    IndexWriterConfig iwc = newIndexWriterConfig(random(), null);
     iwc.setMergePolicy(newLogMergePolicy());
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
 
@@ -133,7 +132,7 @@ public class TestMultiDocValues extends 
     iw.forceMerge(1);
     DirectoryReader ir2 = iw.getReader();
     AtomicReader merged = getOnlySegmentReader(ir2);
-    iw.shutdown();
+    iw.close();
     
     SortedDocValues multi = MultiDocValues.getSortedValues(ir, "bytes");
     SortedDocValues single = merged.getSortedDocValues("bytes");
@@ -159,7 +158,7 @@ public class TestMultiDocValues extends 
     Field field = new SortedDocValuesField("bytes", ref);
     doc.add(field);
     
-    IndexWriterConfig iwc = newIndexWriterConfig(random(), TEST_VERSION_CURRENT, null);
+    IndexWriterConfig iwc = newIndexWriterConfig(random(), null);
     iwc.setMergePolicy(newLogMergePolicy());
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
 
@@ -175,7 +174,7 @@ public class TestMultiDocValues extends 
     iw.forceMerge(1);
     DirectoryReader ir2 = iw.getReader();
     AtomicReader merged = getOnlySegmentReader(ir2);
-    iw.shutdown();
+    iw.close();
     
     SortedDocValues multi = MultiDocValues.getSortedValues(ir, "bytes");
     SortedDocValues single = merged.getSortedDocValues("bytes");
@@ -197,7 +196,7 @@ public class TestMultiDocValues extends 
     assumeTrue("codec does not support SORTED_SET", defaultCodecSupportsSortedSet());
     Directory dir = newDirectory();
     
-    IndexWriterConfig iwc = newIndexWriterConfig(random(), TEST_VERSION_CURRENT, null);
+    IndexWriterConfig iwc = newIndexWriterConfig(random(), null);
     iwc.setMergePolicy(newLogMergePolicy());
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
 
@@ -217,7 +216,7 @@ public class TestMultiDocValues extends 
     iw.forceMerge(1);
     DirectoryReader ir2 = iw.getReader();
     AtomicReader merged = getOnlySegmentReader(ir2);
-    iw.shutdown();
+    iw.close();
     
     SortedSetDocValues multi = MultiDocValues.getSortedSetValues(ir, "bytes");
     SortedSetDocValues single = merged.getSortedSetDocValues("bytes");
@@ -260,7 +259,7 @@ public class TestMultiDocValues extends 
     assumeTrue("codec does not support SORTED_SET", defaultCodecSupportsSortedSet());
     Directory dir = newDirectory();
     
-    IndexWriterConfig iwc = newIndexWriterConfig(random(), TEST_VERSION_CURRENT, null);
+    IndexWriterConfig iwc = newIndexWriterConfig(random(), null);
     iwc.setMergePolicy(newLogMergePolicy());
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
 
@@ -280,7 +279,7 @@ public class TestMultiDocValues extends 
     iw.forceMerge(1);
     DirectoryReader ir2 = iw.getReader();
     AtomicReader merged = getOnlySegmentReader(ir2);
-    iw.shutdown();
+    iw.close();
     
     SortedSetDocValues multi = MultiDocValues.getSortedSetValues(ir, "bytes");
     SortedSetDocValues single = merged.getSortedSetDocValues("bytes");
@@ -322,7 +321,7 @@ public class TestMultiDocValues extends 
     assumeTrue("codec does not support SORTED_NUMERIC", defaultCodecSupportsSortedNumeric());
     Directory dir = newDirectory();
     
-    IndexWriterConfig iwc = newIndexWriterConfig(random(), TEST_VERSION_CURRENT, null);
+    IndexWriterConfig iwc = newIndexWriterConfig(random(), null);
     iwc.setMergePolicy(newLogMergePolicy());
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
 
@@ -342,7 +341,7 @@ public class TestMultiDocValues extends 
     iw.forceMerge(1);
     DirectoryReader ir2 = iw.getReader();
     AtomicReader merged = getOnlySegmentReader(ir2);
-    iw.shutdown();
+    iw.close();
     
     SortedNumericDocValues multi = MultiDocValues.getSortedNumericValues(ir, "nums");
     SortedNumericDocValues single = merged.getSortedNumericDocValues("nums");
@@ -374,7 +373,7 @@ public class TestMultiDocValues extends 
     assumeTrue("codec does not support docsWithField", defaultCodecSupportsDocsWithField());
     Directory dir = newDirectory();
     
-    IndexWriterConfig iwc = newIndexWriterConfig(random(), TEST_VERSION_CURRENT, null);
+    IndexWriterConfig iwc = newIndexWriterConfig(random(), null);
     iwc.setMergePolicy(newLogMergePolicy());
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir, iwc);
 
@@ -394,7 +393,7 @@ public class TestMultiDocValues extends 
     iw.forceMerge(1);
     DirectoryReader ir2 = iw.getReader();
     AtomicReader merged = getOnlySegmentReader(ir2);
-    iw.shutdown();
+    iw.close();
     
     Bits multi = MultiDocValues.getDocsWithField(ir, "numbers");
     Bits single = merged.getDocsWithField("numbers");

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiFields.java Sat Aug  9 18:54:35 2014
@@ -107,7 +107,7 @@ public class TestMultiFields extends Luc
       }
 
       IndexReader reader = w.getReader();
-      w.shutdown();
+      w.close();
       if (VERBOSE) {
         System.out.println("TEST: reader=" + reader);
       }
@@ -163,7 +163,7 @@ public class TestMultiFields extends Luc
     w.commit();
     w.addDocument(d);
     IndexReader r = w.getReader();
-    w.shutdown();
+    w.close();
     DocsEnum d1 = TestUtil.docs(random(), r, "f", new BytesRef("j"), null, null, DocsEnum.FLAG_NONE);
     DocsEnum d2 = TestUtil.docs(random(), r, "f", new BytesRef("j"), null, null, DocsEnum.FLAG_NONE);
     assertEquals(0, d1.nextDoc());
@@ -181,7 +181,7 @@ public class TestMultiFields extends Luc
     w.commit();
     w.addDocument(d);
     IndexReader r = w.getReader();
-    w.shutdown();
+    w.close();
     DocsEnum de = MultiFields.getTermDocsEnum(r, null, "f", new BytesRef("j"));
     assertEquals(0, de.nextDoc());
     assertEquals(1, de.nextDoc());

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestMultiLevelSkipList.java Sat Aug  9 18:54:35 2014
@@ -79,7 +79,7 @@ public class TestMultiLevelSkipList exte
     }
     writer.commit();
     writer.forceMerge(1);
-    writer.shutdown();
+    writer.close();
 
     AtomicReader reader = getOnlySegmentReader(DirectoryReader.open(dir));
     

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTReaderWithThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTReaderWithThreads.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTReaderWithThreads.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTReaderWithThreads.java Sat Aug  9 18:54:35 2014
@@ -69,7 +69,7 @@ public class TestNRTReaderWithThreads ex
     }
     //System.out.println("addCount:"+addCount);
     //System.out.println("delCount:"+delCount);
-    writer.shutdown();
+    writer.close();
     mainDir.close();
   }
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNeverDelete.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNeverDelete.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNeverDelete.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNeverDelete.java Sat Aug  9 18:54:35 2014
@@ -104,7 +104,7 @@ public class TestNeverDelete extends Luc
     for(Thread t : indexThreads) {
       t.join();
     }
-    w.shutdown();
+    w.close();
     d.close();
 
     TestUtil.rm(tmpDir);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNewestSegment.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNewestSegment.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNewestSegment.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNewestSegment.java Sat Aug  9 18:54:35 2014
@@ -26,7 +26,7 @@ public class TestNewestSegment extends L
     Directory directory = newDirectory();
     IndexWriter writer = new IndexWriter(directory, newIndexWriterConfig(new MockAnalyzer(random())));
     assertNull(writer.newestSegment());
-    writer.shutdown();
+    writer.close();
     directory.close();
   }
 }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNoDeletionPolicy.java Sat Aug  9 18:54:35 2014
@@ -26,7 +26,6 @@ import org.apache.lucene.analysis.MockAn
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.MockDirectoryWrapper;
 import org.apache.lucene.util.LuceneTestCase;
 import org.junit.Test;
 
@@ -79,7 +78,7 @@ public class TestNoDeletionPolicy extend
       writer.commit();
       assertEquals("wrong number of commits !", i + 1, DirectoryReader.listCommits(dir).size());
     }
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
   

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNorms.java Sat Aug  9 18:54:35 2014
@@ -92,7 +92,7 @@ public class TestNorms extends LuceneTes
     }
     
     IndexReader reader = writer.getReader();
-    writer.shutdown();
+    writer.close();
     
     NumericDocValues fooNorms = MultiDocValues.getNormValues(reader, "foo");
     for (int i = 0; i < reader.maxDoc(); i++) {
@@ -148,7 +148,7 @@ public class TestNorms extends LuceneTes
       }
     }
     writer.commit();
-    writer.shutdown();
+    writer.close();
     docs.close();
   }
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNumericDocValuesUpdates.java Sat Aug  9 18:54:35 2014
@@ -85,7 +85,7 @@ public class TestNumericDocValuesUpdates
     writer.getConfig().setRAMBufferSizeMB(1000d);
     writer.updateNumericDocValue(new Term("id", "doc-2"), "val", 7L);
     assertEquals(4, writer.getFlushDeletesCount());
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
   
@@ -106,11 +106,11 @@ public class TestNumericDocValuesUpdates
     
     final DirectoryReader reader;
     if (random().nextBoolean()) { // not NRT
-      writer.shutdown();
+      writer.close();
       reader = DirectoryReader.open(dir);
     } else { // NRT
       reader = DirectoryReader.open(writer, true);
-      writer.shutdown();
+      writer.close();
     }
     
     assertEquals(1, reader.leaves().size());
@@ -149,11 +149,11 @@ public class TestNumericDocValuesUpdates
     
     final DirectoryReader reader;
     if (random().nextBoolean()) { // not NRT
-      writer.shutdown();
+      writer.close();
       reader = DirectoryReader.open(dir);
     } else { // NRT
       reader = DirectoryReader.open(writer, true);
-      writer.shutdown();
+      writer.close();
     }
     
     for (AtomicReaderContext context : reader.leaves()) {
@@ -202,7 +202,7 @@ public class TestNumericDocValuesUpdates
     assertEquals(1, reader1.leaves().get(0).reader().getNumericDocValues("val").get(0));
     assertEquals(10, reader2.leaves().get(0).reader().getNumericDocValues("val").get(0));
 
-    writer.shutdown();
+    writer.close();
     IOUtils.close(reader1, reader2, dir);
   }
   
@@ -232,11 +232,11 @@ public class TestNumericDocValuesUpdates
     
     final DirectoryReader reader;
     if (random().nextBoolean()) { // not NRT
-      writer.shutdown();
+      writer.close();
       reader = DirectoryReader.open(dir);
     } else { // NRT
       reader = DirectoryReader.open(writer, true);
-      writer.shutdown();
+      writer.close();
     }
     
     AtomicReader slow = SlowCompositeReaderWrapper.wrap(reader);
@@ -277,11 +277,11 @@ public class TestNumericDocValuesUpdates
     
     final DirectoryReader reader;
     if (random().nextBoolean()) { // not NRT
-      writer.shutdown();
+      writer.close();
       reader = DirectoryReader.open(dir);
     } else { // NRT
       reader = DirectoryReader.open(writer, true);
-      writer.shutdown();
+      writer.close();
     }
     
     AtomicReader r = reader.leaves().get(0).reader();
@@ -312,11 +312,11 @@ public class TestNumericDocValuesUpdates
     
     final DirectoryReader reader;
     if (random().nextBoolean()) { // not NRT
-      writer.shutdown();
+      writer.close();
       reader = DirectoryReader.open(dir);
     } else { // NRT
       reader = DirectoryReader.open(writer, true);
-      writer.shutdown();
+      writer.close();
     }
     
     AtomicReader r = reader.leaves().get(0).reader();
@@ -348,7 +348,7 @@ public class TestNumericDocValuesUpdates
     
     // update all docs' ndv field
     writer.updateNumericDocValue(new Term("dvUpdateKey", "dv"), "ndv", 17L);
-    writer.shutdown();
+    writer.close();
     
     final DirectoryReader reader = DirectoryReader.open(dir);
     AtomicReader r = reader.leaves().get(0).reader();
@@ -396,7 +396,7 @@ public class TestNumericDocValuesUpdates
     
     // update all docs' ndv1 field
     writer.updateNumericDocValue(new Term("dvUpdateKey", "dv"), "ndv1", 17L);
-    writer.shutdown();
+    writer.close();
     
     final DirectoryReader reader = DirectoryReader.open(dir);
     AtomicReader r = reader.leaves().get(0).reader();
@@ -429,7 +429,7 @@ public class TestNumericDocValuesUpdates
     
     // update all docs' ndv field
     writer.updateNumericDocValue(new Term("dvUpdateKey", "dv"), "ndv", 17L);
-    writer.shutdown();
+    writer.close();
     
     final DirectoryReader reader = DirectoryReader.open(dir);
     AtomicReader r = reader.leaves().get(0).reader();
@@ -471,7 +471,7 @@ public class TestNumericDocValuesUpdates
       // ok
     }
     
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
   
@@ -496,7 +496,7 @@ public class TestNumericDocValuesUpdates
     writer.addDocument(doc); // in-memory document
     
     writer.updateNumericDocValue(new Term("key", "doc"), "ndv", 17L);
-    writer.shutdown();
+    writer.close();
     
     final DirectoryReader reader = DirectoryReader.open(dir);
     
@@ -528,7 +528,7 @@ public class TestNumericDocValuesUpdates
     
     writer.updateNumericDocValue(new Term("key", "doc"), "ndv", 17L); // update existing field
     writer.updateNumericDocValue(new Term("key", "doc"), "ndv", 3L); // update existing field 2nd time in this commit
-    writer.shutdown();
+    writer.close();
     
     final DirectoryReader reader = DirectoryReader.open(dir);
     final AtomicReader r = SlowCompositeReaderWrapper.wrap(reader);
@@ -571,7 +571,7 @@ public class TestNumericDocValuesUpdates
       if (random.nextDouble() < 0.4) {
         writer.commit();
       } else if (random.nextDouble() < 0.1) {
-        writer.shutdown();
+        writer.close();
         conf = newIndexWriterConfig(new MockAnalyzer(random));
         writer = new IndexWriter(dir, conf);
       }
@@ -608,7 +608,7 @@ public class TestNumericDocValuesUpdates
       reader.close();
     }
     
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
   
@@ -629,7 +629,7 @@ public class TestNumericDocValuesUpdates
     
     writer.updateNumericDocValue(new Term("k1", "v1"), "ndv", 17L);
     writer.updateNumericDocValue(new Term("k2", "v2"), "ndv", 3L);
-    writer.shutdown();
+    writer.close();
     
     final DirectoryReader reader = DirectoryReader.open(dir);
     final AtomicReader r = SlowCompositeReaderWrapper.wrap(reader);
@@ -728,7 +728,7 @@ public class TestNumericDocValuesUpdates
 //      System.out.println();
     }
 
-    writer.shutdown();
+    writer.close();
     IOUtils.close(reader, dir);
   }
   
@@ -737,7 +737,7 @@ public class TestNumericDocValuesUpdates
     Directory dir = newDirectory();
     IndexWriterConfig conf = newIndexWriterConfig(new MockAnalyzer(random()));
     // prevent merges, otherwise by the time updates are applied
-    // (writer.shutdown()), the segments might have merged and that update becomes
+    // (writer.close()), the segments might have merged and that update becomes
     // legit.
     conf.setMergePolicy(NoMergePolicy.INSTANCE);
     IndexWriter writer = new IndexWriter(dir, conf);
@@ -768,7 +768,7 @@ public class TestNumericDocValuesUpdates
     // update document in the second segment - field should be added and we should
     // be able to handle the other document correctly (e.g. no NPE)
     writer.updateNumericDocValue(new Term("id", "doc1"), "ndv", 5L);
-    writer.shutdown();
+    writer.close();
 
     DirectoryReader reader = DirectoryReader.open(dir);
     for (AtomicReaderContext context : reader.leaves()) {
@@ -791,7 +791,7 @@ public class TestNumericDocValuesUpdates
     Directory dir = newDirectory();
     IndexWriterConfig conf = newIndexWriterConfig(new MockAnalyzer(random()));
     // prevent merges, otherwise by the time updates are applied
-    // (writer.shutdown()), the segments might have merged and that update becomes
+    // (writer.close()), the segments might have merged and that update becomes
     // legit.
     conf.setMergePolicy(NoMergePolicy.INSTANCE);
     IndexWriter writer = new IndexWriter(dir, conf);
@@ -813,7 +813,7 @@ public class TestNumericDocValuesUpdates
     
     // update document in the second segment
     writer.updateNumericDocValue(new Term("id", "doc1"), "ndv", 5L);
-    writer.shutdown();
+    writer.close();
 
     DirectoryReader reader = DirectoryReader.open(dir);
     for (AtomicReaderContext context : reader.leaves()) {
@@ -842,7 +842,7 @@ public class TestNumericDocValuesUpdates
     writer.addDocument(doc);
     writer.commit();
     writer.updateNumericDocValue(new Term("f", "mock-value"), "f", 17L);
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader r = DirectoryReader.open(dir);
     NumericDocValues ndv = r.leaves().get(0).reader().getNumericDocValues("f");
@@ -867,14 +867,14 @@ public class TestNumericDocValuesUpdates
     doc.add(new StringField("id", "doc", Store.NO));
     doc.add(new NumericDocValuesField("f", 5));
     writer.addDocument(doc);
-    writer.shutdown();
+    writer.close();
     
     conf = newIndexWriterConfig(new MockAnalyzer(random()));
     writer = new IndexWriter(dir, conf);
     writer.updateNumericDocValue(new Term("id", "doc"), "f", 4L);
     OLD_FORMAT_IMPERSONATION_IS_ACTIVE = false;
     try {
-      writer.shutdown();
+      writer.close();
       fail("should not have succeeded to update a segment written with an old Codec");
     } catch (UnsupportedOperationException e) {
       writer.rollback(); 
@@ -989,7 +989,7 @@ public class TestNumericDocValuesUpdates
     
     for (Thread t : threads) t.start();
     done.await();
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader reader = DirectoryReader.open(dir);
     for (AtomicReaderContext context : reader.leaves()) {
@@ -1048,7 +1048,7 @@ public class TestNumericDocValuesUpdates
       }
       reader.close();
     }
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
 
@@ -1069,7 +1069,7 @@ public class TestNumericDocValuesUpdates
     doc.add(new NumericDocValuesField("f1", 5L));
     doc.add(new NumericDocValuesField("f2", 13L));
     writer.addDocument(doc);
-    writer.shutdown();
+    writer.close();
     
     // change format
     conf = newIndexWriterConfig(new MockAnalyzer(random()));
@@ -1087,7 +1087,7 @@ public class TestNumericDocValuesUpdates
     doc.add(new NumericDocValuesField("f2", 2L));
     writer.addDocument(doc);
     writer.updateNumericDocValue(new Term("id", "d0"), "f1", 12L);
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader reader = DirectoryReader.open(dir);
     AtomicReader r = SlowCompositeReaderWrapper.wrap(reader);
@@ -1131,7 +1131,7 @@ public class TestNumericDocValuesUpdates
     long value = random().nextInt();
     Term term = new Term("id", RandomPicks.randomFrom(random(), randomTerms));
     writer.updateDocValues(term, new NumericDocValuesField("ndv", value), new NumericDocValuesField("control", value*2));
-    writer.shutdown();
+    writer.close();
     
     Directory dir2 = newDirectory();
     conf = newIndexWriterConfig(new MockAnalyzer(random()));
@@ -1143,7 +1143,7 @@ public class TestNumericDocValuesUpdates
       writer.addIndexes(reader);
       reader.close();
     }
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader reader = DirectoryReader.open(dir2);
     for (AtomicReaderContext context : reader.leaves()) {
@@ -1185,7 +1185,7 @@ public class TestNumericDocValuesUpdates
       assertEquals(numFiles, dir.listAll().length);
     }
     
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
 
@@ -1239,7 +1239,7 @@ public class TestNumericDocValuesUpdates
       writer.updateDocValues(updateTerm, new NumericDocValuesField("f"+field, value), new NumericDocValuesField("cf"+field, value*2));
     }
 
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader reader = DirectoryReader.open(dir);
     for (AtomicReaderContext context : reader.leaves()) {
@@ -1274,7 +1274,7 @@ public class TestNumericDocValuesUpdates
     writer.updateNumericDocValue(new Term("upd", "t2"), "f1", 3L); // update f1 to 3
     writer.updateNumericDocValue(new Term("upd", "t2"), "f2", 3L); // update f2 to 3
     writer.updateNumericDocValue(new Term("upd", "t1"), "f1", 4L); // update f1 to 4 (but not f2)
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader reader = DirectoryReader.open(dir);
     assertEquals(4, reader.leaves().get(0).reader().getNumericDocValues("f1").get(0));
@@ -1299,7 +1299,7 @@ public class TestNumericDocValuesUpdates
     writer.deleteDocuments(new Term("id", "doc")); // delete all docs in the first segment
     writer.addDocument(doc);
     writer.updateNumericDocValue(new Term("id", "doc"), "f1", 2L);
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader reader = DirectoryReader.open(dir);
     assertEquals(1, reader.leaves().size());
@@ -1322,7 +1322,7 @@ public class TestNumericDocValuesUpdates
     // update w/ multiple nonexisting terms in same field
     writer.updateNumericDocValue(new Term("c", "foo"), "f1", 2L);
     writer.updateNumericDocValue(new Term("c", "bar"), "f1", 2L);
-    writer.shutdown();
+    writer.close();
     
     DirectoryReader reader = DirectoryReader.open(dir);
     assertEquals(1, reader.leaves().size());

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitNorms.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitNorms.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitNorms.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitNorms.java Sat Aug  9 18:54:35 2014
@@ -64,7 +64,7 @@ public class TestOmitNorms extends Lucen
     // force merge
     writer.forceMerge(1);
     // flush
-    writer.shutdown();
+    writer.close();
 
     SegmentReader reader = getOnlySegmentReader(DirectoryReader.open(ram));
     FieldInfos fi = reader.getFieldInfos();
@@ -118,7 +118,7 @@ public class TestOmitNorms extends Lucen
     // force merge
     writer.forceMerge(1);
     // flush
-    writer.shutdown();
+    writer.close();
 
     SegmentReader reader = getOnlySegmentReader(DirectoryReader.open(ram));
     FieldInfos fi = reader.getFieldInfos();
@@ -166,7 +166,7 @@ public class TestOmitNorms extends Lucen
     writer.forceMerge(1);
 
     // flush
-    writer.shutdown();
+    writer.close();
 
     SegmentReader reader = getOnlySegmentReader(DirectoryReader.open(ram));
     FieldInfos fi = reader.getFieldInfos();
@@ -213,7 +213,7 @@ public class TestOmitNorms extends Lucen
     // force merge
     writer.forceMerge(1);
     // flush
-    writer.shutdown();
+    writer.close();
 
     assertNoNrm(ram);
     ram.close();
@@ -308,7 +308,7 @@ public class TestOmitNorms extends Lucen
     }
     ir1.close();
     ir2.close();
-    riw.shutdown();
+    riw.close();
     dir.close();
     return norms1;
   }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitPositions.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitPositions.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitPositions.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitPositions.java Sat Aug  9 18:54:35 2014
@@ -49,7 +49,7 @@ public class TestOmitPositions extends L
     }
     
     IndexReader reader = w.getReader();
-    w.shutdown();
+    w.close();
     
     assertNull(MultiFields.getTermPositionsEnum(reader, null, "foo", new BytesRef("test")));
     
@@ -151,7 +151,7 @@ public class TestOmitPositions extends L
     // force merge
     writer.forceMerge(1);
     // flush
-    writer.shutdown();
+    writer.close();
 
     SegmentReader reader = getOnlySegmentReader(DirectoryReader.open(ram));
     FieldInfos fi = reader.getFieldInfos();
@@ -221,7 +221,7 @@ public class TestOmitPositions extends L
     // force merge
     writer.forceMerge(1);
     // flush
-    writer.shutdown();
+    writer.close();
 
     assertNoPrx(ram);
     ram.close();
@@ -259,7 +259,7 @@ public class TestOmitPositions extends L
     FieldInfos fis = MultiFields.getMergedFieldInfos(ir);
     assertEquals(IndexOptions.DOCS_AND_FREQS, fis.fieldInfo("foo").getIndexOptions());
     assertFalse(fis.fieldInfo("foo").hasPayloads());
-    iw.shutdown();
+    iw.close();
     ir.close();
     dir.close(); // checkindex
   }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOmitTf.java Sat Aug  9 18:54:35 2014
@@ -26,11 +26,9 @@ import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
 import org.apache.lucene.document.TextField;
 import org.apache.lucene.index.FieldInfo.IndexOptions;
-import org.apache.lucene.search.LeafCollector;
 import org.apache.lucene.search.BooleanClause.Occur;
 import org.apache.lucene.search.BooleanQuery;
 import org.apache.lucene.search.CollectionStatistics;
-import org.apache.lucene.search.Collector;
 import org.apache.lucene.search.Explanation;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.PhraseQuery;
@@ -104,7 +102,7 @@ public class TestOmitTf extends LuceneTe
     // force merge
     writer.forceMerge(1);
     // flush
-    writer.shutdown();
+    writer.close();
 
     SegmentReader reader = getOnlySegmentReader(DirectoryReader.open(ram));
     FieldInfos fi = reader.getFieldInfos();
@@ -156,7 +154,7 @@ public class TestOmitTf extends LuceneTe
     // force merge
     writer.forceMerge(1);
     // flush
-    writer.shutdown();
+    writer.close();
 
     SegmentReader reader = getOnlySegmentReader(DirectoryReader.open(ram));
     FieldInfos fi = reader.getFieldInfos();
@@ -199,7 +197,7 @@ public class TestOmitTf extends LuceneTe
     writer.forceMerge(1);
 
     // flush
-    writer.shutdown();
+    writer.close();
 
     SegmentReader reader = getOnlySegmentReader(DirectoryReader.open(ram));
     FieldInfos fi = reader.getFieldInfos();
@@ -252,7 +250,7 @@ public class TestOmitTf extends LuceneTe
     // force merge
     writer.forceMerge(1);
     // flush
-    writer.shutdown();
+    writer.close();
 
     assertNoPrx(ram);
     ram.close();
@@ -288,7 +286,7 @@ public class TestOmitTf extends LuceneTe
         
     writer.forceMerge(1);
     // flush
-    writer.shutdown();
+    writer.close();
 
     /*
      * Verify the index
@@ -454,7 +452,7 @@ public class TestOmitTf extends LuceneTe
     doc.add(f);
     iw.addDocument(doc);
     IndexReader ir = iw.getReader();
-    iw.shutdown();
+    iw.close();
     assertEquals(-1, ir.totalTermFreq(new Term("foo", new BytesRef("bar"))));
     assertEquals(-1, ir.getSumTotalTermFreq("foo"));
     ir.close();

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOrdinalMap.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOrdinalMap.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOrdinalMap.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestOrdinalMap.java Sat Aug  9 18:54:35 2014
@@ -64,7 +64,7 @@ public class TestOrdinalMap extends Luce
 
   public void testRamBytesUsed() throws IOException {
     Directory dir = newDirectory();
-    IndexWriterConfig cfg = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random())).setCodec(TestUtil.alwaysDocValuesFormat(new Lucene49DocValuesFormat()));
+    IndexWriterConfig cfg = new IndexWriterConfig(new MockAnalyzer(random())).setCodec(TestUtil.alwaysDocValuesFormat(new Lucene49DocValuesFormat()));
     RandomIndexWriter iw = new RandomIndexWriter(random(), dir, cfg);
     final int maxDoc = TestUtil.nextInt(random(), 10, 1000);
     final int maxTermLength = TestUtil.nextInt(random(), 1, 4);

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelAtomicReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelAtomicReader.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelAtomicReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelAtomicReader.java Sat Aug  9 18:54:35 2014
@@ -149,7 +149,7 @@ public class TestParallelAtomicReader ex
 
     d3.add(newTextField("f3", "v1", Field.Store.YES));
     w2.addDocument(d3);
-    w2.shutdown();
+    w2.close();
     
     AtomicReader ir1 = SlowCompositeReaderWrapper.wrap(DirectoryReader.open(dir1));
     AtomicReader ir2 = SlowCompositeReaderWrapper.wrap(DirectoryReader.open(dir2));
@@ -274,7 +274,7 @@ public class TestParallelAtomicReader ex
     d2.add(newTextField("f3", "v2", Field.Store.YES));
     d2.add(newTextField("f4", "v2", Field.Store.YES));
     w.addDocument(d2);
-    w.shutdown();
+    w.close();
 
     DirectoryReader ir = DirectoryReader.open(dir);
     return newSearcher(ir);
@@ -302,7 +302,7 @@ public class TestParallelAtomicReader ex
     d2.add(newTextField("f1", "v2", Field.Store.YES));
     d2.add(newTextField("f2", "v2", Field.Store.YES));
     w1.addDocument(d2);
-    w1.shutdown();
+    w1.close();
     return dir1;
   }
 
@@ -317,7 +317,7 @@ public class TestParallelAtomicReader ex
     d4.add(newTextField("f3", "v2", Field.Store.YES));
     d4.add(newTextField("f4", "v2", Field.Store.YES));
     w2.addDocument(d4);
-    w2.shutdown();
+    w2.close();
     return dir2;
   }
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelCompositeReader.java Sat Aug  9 18:54:35 2014
@@ -225,7 +225,7 @@ public class TestParallelCompositeReader
 
     d3.add(newTextField("f3", "v1", Field.Store.YES));
     w2.addDocument(d3);
-    w2.shutdown();
+    w2.close();
     
     DirectoryReader ir1 = DirectoryReader.open(dir1),
         ir2 = DirectoryReader.open(dir2);
@@ -444,7 +444,7 @@ public class TestParallelCompositeReader
     d4.add(newTextField("f3", "v4", Field.Store.YES));
     d4.add(newTextField("f4", "v4", Field.Store.YES));
     w.addDocument(d4);
-    w.shutdown();
+    w.close();
 
     final CompositeReader ir;
     if (compositeComposite) {
@@ -498,7 +498,7 @@ public class TestParallelCompositeReader
     d4.add(newTextField("f1", "v4", Field.Store.YES));
     d4.add(newTextField("f2", "v4", Field.Store.YES));
     w1.addDocument(d4);
-    w1.shutdown();
+    w1.close();
     return dir1;
   }
 
@@ -525,7 +525,7 @@ public class TestParallelCompositeReader
     d4.add(newTextField("f3", "v4", Field.Store.YES));
     d4.add(newTextField("f4", "v4", Field.Store.YES));
     w2.addDocument(d4);
-    w2.shutdown();
+    w2.close();
     return dir2;
   }
 
@@ -552,7 +552,7 @@ public class TestParallelCompositeReader
     d4.add(newTextField("f3", "v4", Field.Store.YES));
     d4.add(newTextField("f4", "v4", Field.Store.YES));
     w2.addDocument(d4);
-    w2.shutdown();
+    w2.close();
     return dir2;
   }
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelReaderEmptyIndex.java Sat Aug  9 18:54:35 2014
@@ -40,7 +40,7 @@ public class TestParallelReaderEmptyInde
   public void testEmptyIndex() throws IOException {
     Directory rd1 = newDirectory();
     IndexWriter iw = new IndexWriter(rd1, newIndexWriterConfig(new MockAnalyzer(random())));
-    iw.shutdown();
+    iw.close();
     // create a copy:
     Directory rd2 = newDirectory(rd1);
 
@@ -72,7 +72,7 @@ public class TestParallelReaderEmptyInde
     iwOut.addIndexes(new ParallelCompositeReader());
     iwOut.forceMerge(1);
     
-    iwOut.shutdown();
+    iwOut.close();
     rdOut.close();
     rd1.close();
     rd2.close();
@@ -101,9 +101,9 @@ public class TestParallelReaderEmptyInde
       doc.add(newField("test", "", customType));
       idField.setStringValue("2");
       iw.addDocument(doc);
-      iw.shutdown();
+      iw.close();
 
-      IndexWriterConfig dontMergeConfig = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()))
+      IndexWriterConfig dontMergeConfig = new IndexWriterConfig(new MockAnalyzer(random()))
         .setMergePolicy(NoMergePolicy.INSTANCE);
       if (VERBOSE) {
         System.out.println("\nTEST: make 2nd writer");
@@ -111,7 +111,7 @@ public class TestParallelReaderEmptyInde
       IndexWriter writer = new IndexWriter(rd1, dontMergeConfig);
       
       writer.deleteDocuments(new Term("id", "1"));
-      writer.shutdown();
+      writer.close();
       IndexReader ir = DirectoryReader.open(rd1);
       assertEquals(2, ir.maxDoc());
       assertEquals(1, ir.numDocs());
@@ -120,7 +120,7 @@ public class TestParallelReaderEmptyInde
       iw = new IndexWriter(rd1, newIndexWriterConfig(new MockAnalyzer(random()))
                                   .setOpenMode(OpenMode.APPEND));
       iw.forceMerge(1);
-      iw.shutdown();
+      iw.close();
     }
 
     Directory rd2 = newDirectory();
@@ -128,7 +128,7 @@ public class TestParallelReaderEmptyInde
       IndexWriter iw = new IndexWriter(rd2, newIndexWriterConfig(new MockAnalyzer(random())));
       Document doc = new Document();
       iw.addDocument(doc);
-      iw.shutdown();
+      iw.close();
     }
 
     Directory rdOut = newDirectory();
@@ -153,7 +153,7 @@ public class TestParallelReaderEmptyInde
     rd2.close();
 
     iwOut.forceMerge(1);
-    iwOut.shutdown();
+    iwOut.close();
     
     rdOut.close();
   }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelTermEnum.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelTermEnum.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelTermEnum.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestParallelTermEnum.java Sat Aug  9 18:54:35 2014
@@ -48,7 +48,7 @@ public class TestParallelTermEnum extend
     doc.add(newTextField("field2", "the quick brown fox jumps", Field.Store.YES));
     iw1.addDocument(doc);
 
-    iw1.shutdown();
+    iw1.close();
     rd2 = newDirectory();
     IndexWriter iw2 = new IndexWriter(rd2, newIndexWriterConfig(new MockAnalyzer(random())));
 
@@ -57,7 +57,7 @@ public class TestParallelTermEnum extend
     doc.add(newTextField("field3", "the fox jumps over the lazy dog", Field.Store.YES));
     iw2.addDocument(doc);
 
-    iw2.shutdown();
+    iw2.close();
 
     this.ir1 = SlowCompositeReaderWrapper.wrap(DirectoryReader.open(rd1));
     this.ir2 = SlowCompositeReaderWrapper.wrap(DirectoryReader.open(rd2));

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloads.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloads.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloads.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloads.java Sat Aug  9 18:54:35 2014
@@ -76,7 +76,7 @@ public class TestPayloads extends Lucene
         analyzer.setPayloadData("f2", "somedata".getBytes(StandardCharsets.UTF_8), 0, 1);
         writer.addDocument(d);
         // flush
-        writer.shutdown();
+        writer.close();
 
       SegmentReader reader = getOnlySegmentReader(DirectoryReader.open(ram));
         FieldInfos fi = reader.getFieldInfos();
@@ -103,7 +103,7 @@ public class TestPayloads extends Lucene
         // force merge
         writer.forceMerge(1);
         // flush
-        writer.shutdown();
+        writer.close();
 
       reader = getOnlySegmentReader(DirectoryReader.open(ram));
         fi = reader.getFieldInfos();
@@ -172,7 +172,7 @@ public class TestPayloads extends Lucene
         
         writer.forceMerge(1);
         // flush
-        writer.shutdown();
+        writer.close();
         
         
         /*
@@ -277,7 +277,7 @@ public class TestPayloads extends Lucene
         
         writer.forceMerge(1);
         // flush
-        writer.shutdown();
+        writer.close();
         
         reader = DirectoryReader.open(dir);
         tp = MultiFields.getTermPositionsEnum(reader,
@@ -477,7 +477,7 @@ public class TestPayloads extends Lucene
         for (int i = 0; i < numThreads; i++) {
           ingesters[i].join();
         }
-        writer.shutdown();
+        writer.close();
         IndexReader reader = DirectoryReader.open(dir);
         TermsEnum terms = MultiFields.getFields(reader).terms(field).iterator(null);
         Bits liveDocs = MultiFields.getLiveDocs(reader);
@@ -565,7 +565,7 @@ public class TestPayloads extends Lucene
     Document doc = new Document();
     doc.add(new TextField("hasMaybepayload", "here we go", Field.Store.YES));
     writer.addDocument(doc);
-    writer.shutdown();
+    writer.close();
 
     writer = new RandomIndexWriter(random(), dir,
                                    new MockAnalyzer(random(), MockTokenizer.WHITESPACE, true));
@@ -574,7 +574,7 @@ public class TestPayloads extends Lucene
     writer.addDocument(doc);
     writer.addDocument(doc);
     writer.forceMerge(1);
-    writer.shutdown();
+    writer.close();
 
     dir.close();
   }
@@ -608,7 +608,7 @@ public class TestPayloads extends Lucene
     de.nextDoc();
     de.nextPosition();
     assertEquals(new BytesRef("test"), de.getPayload());
-    writer.shutdown();
+    writer.close();
     reader.close();
     dir.close();
   }
@@ -642,7 +642,7 @@ public class TestPayloads extends Lucene
     de.nextDoc();
     de.nextPosition();
     assertEquals(new BytesRef("test"), de.getPayload());
-    writer.shutdown();
+    writer.close();
     reader.close();
     dir.close();
   }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloadsOnVectors.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloadsOnVectors.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloadsOnVectors.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPayloadsOnVectors.java Sat Aug  9 18:54:35 2014
@@ -76,7 +76,7 @@ public class TestPayloadsOnVectors exten
     assertEquals(0, de.nextDoc());
     assertEquals(0, de.nextPosition());
     assertEquals(new BytesRef("test"), de.getPayload());
-    writer.shutdown();
+    writer.close();
     reader.close();
     dir.close();
   }
@@ -118,7 +118,7 @@ public class TestPayloadsOnVectors exten
     assertEquals(0, de.nextDoc());
     assertEquals(3, de.nextPosition());
     assertEquals(new BytesRef("test"), de.getPayload());
-    writer.shutdown();
+    writer.close();
     reader.close();
     dir.close();
   }
@@ -139,7 +139,7 @@ public class TestPayloadsOnVectors exten
     } catch (IllegalArgumentException expected) {
       // expected
     }
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPerSegmentDeletes.java Sat Aug  9 18:54:35 2014
@@ -38,8 +38,7 @@ public class TestPerSegmentDeletes exten
   public void testDeletes1() throws Exception {
     //IndexWriter.debug2 = System.out;
     Directory dir = new MockDirectoryWrapper(new Random(random().nextLong()), new RAMDirectory());
-    IndexWriterConfig iwc = new IndexWriterConfig(TEST_VERSION_CURRENT,
-        new MockAnalyzer(random()));
+    IndexWriterConfig iwc = new IndexWriterConfig(new MockAnalyzer(random()));
     iwc.setMergeScheduler(new SerialMergeScheduler());
     iwc.setMaxBufferedDocs(5000);
     iwc.setRAMBufferSizeMB(100);
@@ -160,7 +159,7 @@ public class TestPerSegmentDeletes exten
     **/
     // System.out.println("segdels2:"+writer.docWriter.segmentDeletes.toString());
     //System.out.println("close");
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPersistentSnapshotDeletionPolicy.java Sat Aug  9 18:54:35 2014
@@ -55,7 +55,7 @@ public class TestPersistentSnapshotDelet
     assertNull(psdp.getLastSaveFile());
     prepareIndexAndSnapshots(psdp, writer, numSnapshots);
     assertNotNull(psdp.getLastSaveFile());
-    writer.shutdown();
+    writer.close();
 
     // Make sure only 1 save file exists:
     int count = 0;
@@ -88,7 +88,7 @@ public class TestPersistentSnapshotDelet
     assertEquals(numSnapshots+1, psdp.getSnapshotCount());
     assertSnapshotExists(dir, psdp, numSnapshots+1, false);
 
-    writer.shutdown();
+    writer.close();
     dir.close();
   }
 
@@ -142,7 +142,7 @@ public class TestPersistentSnapshotDelet
       }
     }
     assertEquals(0, psdp.getSnapshotCount());
-    writer.shutdown();
+    writer.close();
     assertEquals(1, DirectoryReader.listCommits(dir).size());
     dir.close();
   }
@@ -153,7 +153,7 @@ public class TestPersistentSnapshotDelet
     IndexWriter writer = new IndexWriter(dir, getConfig(random(), getDeletionPolicy(dir)));
     PersistentSnapshotDeletionPolicy psdp = (PersistentSnapshotDeletionPolicy) writer.getConfig().getIndexDeletionPolicy();
     prepareIndexAndSnapshots(psdp, writer, 1);
-    writer.shutdown();
+    writer.close();
 
     psdp.release(snapshots.get(0));
 
@@ -169,7 +169,7 @@ public class TestPersistentSnapshotDelet
     IndexWriter writer = new IndexWriter(dir, getConfig(random(), getDeletionPolicy(dir)));
     PersistentSnapshotDeletionPolicy psdp = (PersistentSnapshotDeletionPolicy) writer.getConfig().getIndexDeletionPolicy();
     prepareIndexAndSnapshots(psdp, writer, 1);
-    writer.shutdown();
+    writer.close();
 
     psdp.release(snapshots.get(0).getGeneration());
 

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java Sat Aug  9 18:54:35 2014
@@ -30,7 +30,6 @@ import org.apache.lucene.analysis.MockPa
 import org.apache.lucene.analysis.MockTokenizer;
 import org.apache.lucene.analysis.Token;
 import org.apache.lucene.analysis.TokenStream;
-import org.apache.lucene.analysis.Analyzer.TokenStreamComponents;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.FieldType;
@@ -82,7 +81,7 @@ public class TestPostingsOffsets extends
 
     w.addDocument(doc);
     IndexReader r = w.getReader();
-    w.shutdown();
+    w.close();
 
     DocsAndPositionsEnum dp = MultiFields.getTermPositionsEnum(r, null, "content", new BytesRef("a"));
     assertNotNull(dp);
@@ -151,7 +150,7 @@ public class TestPostingsOffsets extends
     }
     
     IndexReader reader = w.getReader();
-    w.shutdown();
+    w.close();
     
     String terms[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "hundred" };
     
@@ -288,7 +287,7 @@ public class TestPostingsOffsets extends
       w.addDocument(doc);
     }
     final DirectoryReader r = w.getReader();
-    w.shutdown();
+    w.close();
 
     final String[] terms = new String[] {"a", "b", "c", "d"};
     for(AtomicReaderContext ctx : r.leaves()) {
@@ -385,7 +384,7 @@ public class TestPostingsOffsets extends
     assertEquals(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS, fis.fieldInfo("foo").getIndexOptions());
     slow.close();
     ir.close();
-    riw.shutdown();
+    riw.close();
     dir.close();
   }
   
@@ -401,7 +400,7 @@ public class TestPostingsOffsets extends
     doc.add(new Field("content3", "here is more content with aaa aaa aaa", customType3));
     doc.add(new Field("content3", "here is more content with aaa aaa aaa", customType3));
     iw.addDocument(doc);
-    iw.shutdown();
+    iw.close();
     dir.close(); // checkindex
   }
   
@@ -462,7 +461,7 @@ public class TestPostingsOffsets extends
         return -10;
       }
     };
-    IndexWriter iw = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, analyzer));
+    IndexWriter iw = new IndexWriter(dir, new IndexWriterConfig(analyzer));
     // add good document
     Document doc = new Document();
     iw.addDocument(doc);
@@ -474,7 +473,7 @@ public class TestPostingsOffsets extends
       iw.addDocument(doc);
       fail("didn't get expected exception");
     } catch (IllegalArgumentException expected) {}
-    iw.shutdown();
+    iw.close();
 
     // make sure we see our good doc
     DirectoryReader r = DirectoryReader.open(dir);   
@@ -504,7 +503,7 @@ public class TestPostingsOffsets extends
     Field field = new Field("foo", tokenStream, ft);
     doc.add(field);
     iw.addDocument(doc);
-    iw.shutdown();
+    iw.close();
     dir.close();
   }
   // TODO: more tests with other possibilities
@@ -524,7 +523,7 @@ public class TestPostingsOffsets extends
       Document doc = new Document();
       doc.add(new Field("body", new CannedTokenStream(tokens), ft));
       riw.addDocument(doc);
-      riw.shutdown();
+      riw.close();
       success = true;
     } finally {
       if (success) {

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestReaderClosed.java Sat Aug  9 18:54:35 2014
@@ -52,7 +52,7 @@ public class TestReaderClosed extends Lu
       writer.addDocument(doc);
     }
     reader = writer.getReader();
-    writer.shutdown();
+    writer.close();
   }
   
   public void test() throws Exception {
@@ -87,7 +87,7 @@ public class TestReaderClosed extends Lu
         ace.getMessage()
       );
     } finally {
-      // shutdown executor: in case of wrap-wrap-wrapping
+      // close executor: in case of wrap-wrap-wrapping
       searcher.getIndexReader().close();
     }
   }

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollback.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollback.java?rev=1617004&r1=1617003&r2=1617004&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollback.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestRollback.java Sat Aug  9 18:54:35 2014
@@ -34,7 +34,7 @@ public class TestRollback extends Lucene
       doc.add(newStringField("pk", Integer.toString(i), Field.Store.YES));
       rw.addDocument(doc);
     }
-    rw.shutdown();
+    rw.close();
 
     // If buffer size is small enough to cause a flush, errors ensue...
     IndexWriter w = new IndexWriter(dir, newIndexWriterConfig(new MockAnalyzer(random()))



Mime
View raw message