Index: contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java
===================================================================
--- contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java	(revision 887588)
+++ contrib/spellchecker/src/test/org/apache/lucene/search/spell/TestSpellChecker.java	(working copy)
@@ -22,9 +22,6 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Random;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
 
 import org.apache.lucene.analysis.SimpleAnalyzer;
 import org.apache.lucene.document.Document;
@@ -51,7 +48,6 @@
   private final Random random = newRandom();
   private List<IndexSearcher> searchers;
 
-  @Override
   protected void setUp() throws Exception {
     super.setUp();
     
@@ -280,13 +276,12 @@
     int num_field2 = this.numdoc();
     assertEquals(num_field2, num_field1 + 1);
     int numThreads = 5 + this.random.nextInt(5);
-    ExecutorService executor = Executors.newFixedThreadPool(numThreads);
     SpellCheckWorker[] workers = new SpellCheckWorker[numThreads];
+    
     for (int i = 0; i < numThreads; i++) {
       SpellCheckWorker spellCheckWorker = new SpellCheckWorker(r);
-      executor.execute(spellCheckWorker);
+      spellCheckWorker.start();
       workers[i] = spellCheckWorker;
-      
     }
     int iterations = 5 + random.nextInt(5);
     for (int i = 0; i < iterations; i++) {
@@ -296,11 +291,10 @@
       // for debug - prints the internal open searchers 
       // showSearchersOpen();
     }
-    
+   
     spellChecker.close();
-    executor.shutdown();
-    executor.awaitTermination(5, TimeUnit.SECONDS);
     
+    joinAll(workers, 5000);
     
     for (int i = 0; i < workers.length; i++) {
       assertFalse(workers[i].failed);
@@ -315,6 +309,20 @@
     
   }
   
+  private void joinAll(SpellCheckWorker[] workers, long timeout) throws InterruptedException {
+    for (int j = 0; j < workers.length; j++) {
+      final long time = System.currentTimeMillis();
+      if(timeout < 0){
+        // this could be helpful if it fails one day
+        System.err.println("Warning: "+(workers.length - j)+" threads have not joined but joinall timed out");
+        break;
+      }
+      workers[j].join(timeout);
+      timeout -= System.currentTimeMillis() - time;
+    }
+  }
+
+
   private void assertLastSearcherOpen(int numSearchers) {
     assertEquals(numSearchers, searchers.size());
     IndexSearcher[] searcherArray = searchers.toArray(new IndexSearcher[0]);
@@ -345,7 +353,7 @@
   }
 
   
-  private class SpellCheckWorker implements Runnable {
+  private class SpellCheckWorker extends Thread {
     private final IndexReader reader;
     boolean terminated = false;
     boolean failed = false;
@@ -387,7 +395,6 @@
       super(spellIndex, sd);
     }
 
-    @Override
     IndexSearcher createSearcher(Directory dir) throws IOException {
       IndexSearcher searcher = super.createSearcher(dir);
       TestSpellChecker.this.searchers.add(searcher);
