incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [4/5] git commit: Refactoring all integration tests to run as a test suite in their own project. This is an effort to get the tests to run faster.
Date Mon, 08 Jun 2015 12:41:52 GMT
http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/manager/writer/SharedMergeSchedulerThroughputTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/manager/writer/SharedMergeSchedulerThroughputTest.java b/blur-core/src/test/java/org/apache/blur/manager/writer/SharedMergeSchedulerThroughputTest.java
deleted file mode 100644
index 630cda2..0000000
--- a/blur-core/src/test/java/org/apache/blur/manager/writer/SharedMergeSchedulerThroughputTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.blur.manager.writer;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Random;
-
-import org.apache.blur.BlurConfiguration;
-import org.apache.blur.MiniCluster;
-import org.apache.blur.store.BlockCacheDirectoryFactoryV2;
-import org.apache.blur.store.hdfs.HdfsDirectory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.document.TextField;
-import org.apache.lucene.document.Field.Store;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.IndexWriterConfig;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.util.Version;
-import org.junit.Test;
-
-public class SharedMergeSchedulerThroughputTest {
-
-//  @Test
-  public void test() throws IOException {
-    MiniCluster miniCluster = new MiniCluster();
-    miniCluster.startDfs("./tmp/hdfs");
-    IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_43, new StandardAnalyzer(Version.LUCENE_43));
-    SharedMergeScheduler sharedMergeScheduler = new SharedMergeScheduler(10);
-    conf.setMergeScheduler(sharedMergeScheduler.getMergeScheduler());
-    Configuration configuration = new Configuration();
-    URI fileSystemUri = miniCluster.getFileSystemUri();
-    Path path = new Path(fileSystemUri.toString() + "/merge-test");
-    FileSystem fileSystem = path.getFileSystem(configuration);
-    fileSystem.delete(path, true);
-    HdfsDirectory directory = new HdfsDirectory(configuration, path);
-    BlurConfiguration blurConfiguration = new BlurConfiguration();
-    BlockCacheDirectoryFactoryV2 factory = new BlockCacheDirectoryFactoryV2(blurConfiguration, 1000000l);
-
-    Directory cdir = factory.newDirectory("t", "s", directory, null);
-    IndexWriter writer = new IndexWriter(cdir, conf);
-    Random random = new Random(1);
-    StringBuilder stringBuilder = new StringBuilder();
-    long s = System.nanoTime();
-    for (int i = 0; i < 250000; i++) {
-      if (i % 5000 == 0) {
-        System.out.println(i);
-      }
-      stringBuilder.setLength(0);
-      for (int w = 0; w < 2000; w++) {
-        stringBuilder.append(Integer.toString(random.nextInt(100000))).append(' ');
-      }
-      Document document = new Document();
-      document.add(new TextField("body", stringBuilder.toString(), Store.YES));
-      writer.addDocument(document);
-    }
-    writer.close(true);
-    sharedMergeScheduler.close();
-    factory.close();
-    long e = System.nanoTime();
-    System.out.println("Total Time [" + (e - s) / 1000000.0 + " ms]");
-    miniCluster.shutdownDfs();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/manager/writer/SharedMergeSchedulerThroughputTestIT.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/manager/writer/SharedMergeSchedulerThroughputTestIT.java b/blur-core/src/test/java/org/apache/blur/manager/writer/SharedMergeSchedulerThroughputTestIT.java
new file mode 100644
index 0000000..f527bbe
--- /dev/null
+++ b/blur-core/src/test/java/org/apache/blur/manager/writer/SharedMergeSchedulerThroughputTestIT.java
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.blur.manager.writer;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Random;
+
+import org.apache.blur.BlurConfiguration;
+import org.apache.blur.MiniCluster;
+import org.apache.blur.store.BlockCacheDirectoryFactoryV2;
+import org.apache.blur.store.hdfs.HdfsDirectory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.lucene.document.Document;
+import org.apache.lucene.document.TextField;
+import org.apache.lucene.document.Field.Store;
+import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.index.IndexWriterConfig;
+import org.apache.lucene.store.Directory;
+import org.apache.lucene.util.Version;
+import org.junit.Test;
+
+public class SharedMergeSchedulerThroughputTestIT {
+
+  @Test
+  public void voidTest() {
+
+  }
+
+  public void test() throws IOException {
+    MiniCluster miniCluster = new MiniCluster();
+    miniCluster.startDfs("./tmp/hdfs");
+    IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_43, new StandardAnalyzer(Version.LUCENE_43));
+    SharedMergeScheduler sharedMergeScheduler = new SharedMergeScheduler(10);
+    conf.setMergeScheduler(sharedMergeScheduler.getMergeScheduler());
+    Configuration configuration = new Configuration();
+    URI fileSystemUri = miniCluster.getFileSystemUri();
+    Path path = new Path(fileSystemUri.toString() + "/merge-test");
+    FileSystem fileSystem = path.getFileSystem(configuration);
+    fileSystem.delete(path, true);
+    HdfsDirectory directory = new HdfsDirectory(configuration, path);
+    BlurConfiguration blurConfiguration = new BlurConfiguration();
+    BlockCacheDirectoryFactoryV2 factory = new BlockCacheDirectoryFactoryV2(blurConfiguration, 1000000l);
+
+    Directory cdir = factory.newDirectory("t", "s", directory, null);
+    IndexWriter writer = new IndexWriter(cdir, conf);
+    Random random = new Random(1);
+    StringBuilder stringBuilder = new StringBuilder();
+    long s = System.nanoTime();
+    for (int i = 0; i < 250000; i++) {
+      if (i % 5000 == 0) {
+        System.out.println(i);
+      }
+      stringBuilder.setLength(0);
+      for (int w = 0; w < 2000; w++) {
+        stringBuilder.append(Integer.toString(random.nextInt(100000))).append(' ');
+      }
+      Document document = new Document();
+      document.add(new TextField("body", stringBuilder.toString(), Store.YES));
+      writer.addDocument(document);
+    }
+    writer.close(true);
+    sharedMergeScheduler.close();
+    factory.close();
+    long e = System.nanoTime();
+    System.out.println("Total Time [" + (e - s) / 1000000.0 + " ms]");
+    miniCluster.shutdownDfs();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/BaseClusterTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BaseClusterTest.java b/blur-core/src/test/java/org/apache/blur/thrift/BaseClusterTest.java
index 2934f31..e7f8cac 100644
--- a/blur-core/src/test/java/org/apache/blur/thrift/BaseClusterTest.java
+++ b/blur-core/src/test/java/org/apache/blur/thrift/BaseClusterTest.java
@@ -24,15 +24,12 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 
 public class BaseClusterTest {
+
   protected static String TABLE_PATH = new File("./target/tmp/test-data/test-tables").getAbsolutePath();
-  private static boolean _managing;
 
   @BeforeClass
   public static void startup() throws IOException {
-    if (!SuiteCluster.isClusterSetup()) {
-      SuiteCluster.setupMiniCluster();
-      _managing = true;
-    }
+    SuiteCluster.setupMiniCluster(BaseClusterTest.class);
     File file = new File("test-data");
     if (file.exists()) {
       rmr(file);
@@ -53,15 +50,13 @@ public class BaseClusterTest {
 
   @AfterClass
   public static void shutdown() throws IOException {
-    if (_managing) {
-      SuiteCluster.shutdownMiniCluster();
-    }
+    SuiteCluster.shutdownMiniCluster(BaseClusterTest.class);
   }
 
   public Iface getClient() throws IOException {
     return SuiteCluster.getClient();
   }
-  
+
   protected String getZkConnString() {
     return SuiteCluster.getZooKeeperConnStr();
   }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/BlurClientTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurClientTest.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurClientTest.java
deleted file mode 100644
index dd8cf65..0000000
--- a/blur-core/src/test/java/org/apache/blur/thrift/BlurClientTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.blur.thrift;
-
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.blur.MiniCluster;
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.generated.Blur.Iface;
-import org.apache.blur.thrift.generated.BlurException;
-import org.junit.Test;
-
-import com.google.common.base.Splitter;
-
-public class BlurClientTest {
-  private static final File TMPDIR = new File(System.getProperty("blur.tmp.dir", "./target/tmp_BlurClientTest"));
-
-  @Test
-  public void testMultipleQuorums() throws BlurException, TException {
-    File testDirectory = new File(TMPDIR, "testMultipleQuorums").getAbsoluteFile();
-    testDirectory.mkdirs();
-    MiniCluster cluster1 = new MiniCluster();
-    cluster1.startBlurCluster(new File(testDirectory, "cluster1").getAbsolutePath(), 1, 1, true, false);
-
-    MiniCluster cluster2 = new MiniCluster();
-    cluster2.startBlurCluster(new File(testDirectory, "cluster2").getAbsolutePath(), 2, 1, true, false);
-
-    Iface client1 = BlurClient.getClientFromZooKeeperConnectionStr(cluster1.getZkConnectionString());
-    Iface client2 = BlurClient.getClientFromZooKeeperConnectionStr(cluster2.getZkConnectionString());
-
-    List<String> controllerServerList1 = client1.controllerServerList();
-    List<String> controllerServerList1FromConnectionStr = getList(cluster1.getControllerConnectionStr());
-    List<String> controllerServerList2 = client2.controllerServerList();
-    List<String> controllerServerList2FromConnectionStr = getList(cluster2.getControllerConnectionStr());
-
-    Collections.sort(controllerServerList1);
-    Collections.sort(controllerServerList1FromConnectionStr);
-    Collections.sort(controllerServerList2);
-    Collections.sort(controllerServerList2FromConnectionStr);
-
-    cluster1.shutdownBlurCluster();
-    cluster2.shutdownBlurCluster();
-
-    assertEquals(controllerServerList1FromConnectionStr, controllerServerList1);
-    assertEquals(controllerServerList2FromConnectionStr, controllerServerList2);
-    assertFalse(controllerServerList1.equals(controllerServerList2));
-
-  }
-
-  private List<String> getList(String controllerConnectionStr) {
-    Splitter splitter = Splitter.on(',');
-    List<String> results = new ArrayList<String>();
-    for (String s : splitter.split(controllerConnectionStr)) {
-      results.add(s);
-    }
-    return results;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/BlurClientTestMultipleQuorumsIT.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurClientTestMultipleQuorumsIT.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurClientTestMultipleQuorumsIT.java
new file mode 100644
index 0000000..b314309
--- /dev/null
+++ b/blur-core/src/test/java/org/apache/blur/thrift/BlurClientTestMultipleQuorumsIT.java
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.blur.thrift;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.blur.MiniCluster;
+import org.apache.blur.thirdparty.thrift_0_9_0.TException;
+import org.apache.blur.thrift.generated.Blur.Iface;
+import org.apache.blur.thrift.generated.BlurException;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.google.common.base.Splitter;
+
+public class BlurClientTestMultipleQuorumsIT {
+  private static final File TMPDIR = new File(System.getProperty("blur.tmp.dir", "./target/tmp_BlurClientTest"));
+
+  @BeforeClass
+  public static void startup() throws IOException, BlurException, TException {
+    SuiteCluster.setupMiniCluster(BlurClientTestMultipleQuorumsIT.class);
+  }
+
+  @AfterClass
+  public static void shutdown() throws IOException {
+    SuiteCluster.shutdownMiniCluster(BlurClientTestMultipleQuorumsIT.class);
+  }
+
+  @After
+  public void teadown() {
+    BlurClient.closeZooKeeper();
+  }
+
+  @Test
+  public void testMultipleQuorums() throws BlurException, TException {
+    File testDirectory = new File(TMPDIR, "testMultipleQuorums").getAbsoluteFile();
+    testDirectory.mkdirs();
+
+    MiniCluster cluster2 = new MiniCluster();
+    cluster2.startBlurCluster(new File(testDirectory, "cluster2").getAbsolutePath(), 2, 1, true, false);
+
+    Iface client1 = BlurClient.getClientFromZooKeeperConnectionStr(SuiteCluster.getZooKeeperConnStr());
+    Iface client2 = BlurClient.getClientFromZooKeeperConnectionStr(cluster2.getZkConnectionString());
+
+    List<String> controllerServerList1 = client1.controllerServerList();
+    List<String> controllerServerList1FromConnectionStr = getList(SuiteCluster.getControllerConnectionStr());
+    List<String> controllerServerList2 = client2.controllerServerList();
+    List<String> controllerServerList2FromConnectionStr = getList(cluster2.getControllerConnectionStr());
+
+    Collections.sort(controllerServerList1);
+    Collections.sort(controllerServerList1FromConnectionStr);
+    Collections.sort(controllerServerList2);
+    Collections.sort(controllerServerList2FromConnectionStr);
+
+    cluster2.shutdownBlurCluster();
+
+    assertEquals(controllerServerList1FromConnectionStr, controllerServerList1);
+    assertEquals(controllerServerList2FromConnectionStr, controllerServerList2);
+    assertFalse(controllerServerList1.equals(controllerServerList2));
+
+  }
+
+  private List<String> getList(String controllerConnectionStr) {
+    Splitter splitter = Splitter.on(',');
+    List<String> results = new ArrayList<String>();
+    for (String s : splitter.split(controllerConnectionStr)) {
+      results.add(s);
+    }
+    return results;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestBase.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestBase.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestBase.java
index f0e4a12..76b6791 100644
--- a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestBase.java
+++ b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestBase.java
@@ -79,14 +79,10 @@ import org.apache.blur.thrift.util.BlurThriftHelper;
 import org.apache.blur.user.User;
 import org.apache.blur.user.UserContext;
 import org.apache.blur.utils.BlurConstants;
-import org.apache.blur.utils.GCWatcher;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.LocalFileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.fs.permission.FsAction;
-import org.apache.hadoop.fs.permission.FsPermission;
 import org.apache.zookeeper.KeeperException;
 import org.junit.After;
 import org.junit.AfterClass;
@@ -103,33 +99,52 @@ public abstract class BlurClusterTestBase {
   protected int numberOfDocs = 1000;
   protected String controllerConnectionStr;
 
+  // These setting were here before this test used the SuiteCluster class...
+  // Will remove at some point in the future once we are sure we will no longer
+  // need them.
+
+  // @BeforeClass
+  // public static void startCluster() throws IOException {
+  // GCWatcher.init(0.60);
+  // LocalFileSystem localFS = FileSystem.getLocal(new Configuration());
+  // File testDirectory = new File(TMPDIR,
+  // "blur-cluster-test").getAbsoluteFile();
+  // testDirectory.mkdirs();
+  //
+  // Path directory = new Path(testDirectory.getPath());
+  // FsPermission dirPermissions =
+  // localFS.getFileStatus(directory).getPermission();
+  // FsAction userAction = dirPermissions.getUserAction();
+  // FsAction groupAction = dirPermissions.getGroupAction();
+  // FsAction otherAction = dirPermissions.getOtherAction();
+  //
+  // StringBuilder builder = new StringBuilder();
+  // builder.append(userAction.ordinal());
+  // builder.append(groupAction.ordinal());
+  // builder.append(otherAction.ordinal());
+  // String dirPermissionNum = builder.toString();
+  // System.setProperty("dfs.datanode.data.dir.perm", dirPermissionNum);
+  // testDirectory.delete();
+  // miniCluster = new MiniCluster();
+  // miniCluster.startBlurCluster(new File(testDirectory,
+  // "cluster").getAbsolutePath(), 2, 3, true, externalProcesses);
+  // }
+  //
+  // @AfterClass
+  // public static void shutdownCluster() {
+  // miniCluster.shutdownBlurCluster();
+  // }
+
   @BeforeClass
-  public static void startCluster() throws IOException {
-    GCWatcher.init(0.60);
-    LocalFileSystem localFS = FileSystem.getLocal(new Configuration());
-    File testDirectory = new File(TMPDIR, "blur-cluster-test").getAbsoluteFile();
-    testDirectory.mkdirs();
-
-    Path directory = new Path(testDirectory.getPath());
-    FsPermission dirPermissions = localFS.getFileStatus(directory).getPermission();
-    FsAction userAction = dirPermissions.getUserAction();
-    FsAction groupAction = dirPermissions.getGroupAction();
-    FsAction otherAction = dirPermissions.getOtherAction();
-
-    StringBuilder builder = new StringBuilder();
-    builder.append(userAction.ordinal());
-    builder.append(groupAction.ordinal());
-    builder.append(otherAction.ordinal());
-    String dirPermissionNum = builder.toString();
-    System.setProperty("dfs.datanode.data.dir.perm", dirPermissionNum);
-    testDirectory.delete();
-    miniCluster = new MiniCluster();
-    miniCluster.startBlurCluster(new File(testDirectory, "cluster").getAbsolutePath(), 2, 3, true, externalProcesses);
+  public static void startup() throws IOException, BlurException, TException {
+    SuiteCluster.setupMiniCluster(BlurClusterTestBase.class);
+    externalProcesses = SuiteCluster.externalProcesses;
+    miniCluster = SuiteCluster.getMiniCluster();
   }
 
   @AfterClass
-  public static void shutdownCluster() {
-    miniCluster.shutdownBlurCluster();
+  public static void shutdown() throws IOException {
+    SuiteCluster.shutdownMiniCluster(BlurClusterTestBase.class);
   }
 
   @Before
@@ -231,7 +246,7 @@ public abstract class BlurClusterTestBase {
     assertEquals(5, shardServerLayoutState.size());
 
     List<String> shardServerList = client.shardServerList(BlurConstants.DEFAULT);
-    assertEquals(3, shardServerList.size());
+    assertEquals(2, shardServerList.size());
   }
 
   @Test
@@ -627,6 +642,7 @@ public abstract class BlurClusterTestBase {
             client.query(tableName, blurQueryRow);
             fail.set(true);
           } catch (BlurException e) {
+            e.printStackTrace();
             error.set(e);
           } catch (TException e) {
             e.printStackTrace();
@@ -640,7 +656,7 @@ public abstract class BlurClusterTestBase {
       if (fail.get()) {
         fail("Unknown error, failing test.");
       }
-      assertEquals(blurException.getErrorType(), ErrorType.QUERY_CANCEL);
+      assertEquals(ErrorType.QUERY_CANCEL, blurException.getErrorType());
     } finally {
       setDebugRunSlow(tableName, false);
     }
@@ -799,7 +815,7 @@ public abstract class BlurClusterTestBase {
     assertEquals(numberOfDocs, results1.getTotalResults());
     assertRowResults(results1);
 
-    miniCluster.killShardServer(1);
+    miniCluster.killRandomShardServer();
 
     // make sure the WAL syncs
     Thread.sleep(TimeUnit.SECONDS.toMillis(1));
@@ -807,13 +823,13 @@ public abstract class BlurClusterTestBase {
     // This should block until shards have failed over
     client.shardServerLayout(tableName);
 
-    assertEquals("We should have lost a node.", 2, client.shardServerList(BlurConstants.DEFAULT).size());
+    assertEquals("We should have lost a node.", 1, client.shardServerList(BlurConstants.DEFAULT).size());
     assertEquals(numberOfDocs, client.query(tableName, blurQuery).getTotalResults());
 
     miniCluster.startShards(1, true, externalProcesses);
     Thread.sleep(TimeUnit.SECONDS.toMillis(1));
 
-    assertEquals("We should have the cluster back where we started.", 3, client.shardServerList(BlurConstants.DEFAULT)
+    assertEquals("We should have the cluster back where we started.", 2, client.shardServerList(BlurConstants.DEFAULT)
         .size());
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestNoSecurity.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestNoSecurity.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestNoSecurity.java
deleted file mode 100644
index 1504f01..0000000
--- a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestNoSecurity.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.blur.thrift;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.blur.thrift.generated.Blur.Iface;
-import org.apache.blur.thrift.generated.RowMutation;
-import org.apache.blur.thrift.generated.TableDescriptor;
-import org.apache.blur.user.User;
-
-public class BlurClusterTestNoSecurity extends BlurClusterTestBase {
-
-  @Override
-  protected void setupTableProperties(TableDescriptor tableDescriptor) {
-    // do nothing
-  }
-
-  @Override
-  protected RowMutation mutate(RowMutation rowMutation) {
-    return rowMutation;
-  }
-
-  @Override
-  protected void postTableCreate(TableDescriptor tableDescriptor, Iface client) {
-
-  }
-
-  @Override
-  protected User getUser() {
-    return null;
-  }
-
-  @Override
-  protected Map<String, String> getUserAttributes() {
-    return new HashMap<String, String>();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestNoSecurityIT.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestNoSecurityIT.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestNoSecurityIT.java
new file mode 100644
index 0000000..521a4a4
--- /dev/null
+++ b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestNoSecurityIT.java
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.blur.thrift;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.blur.thrift.generated.Blur.Iface;
+import org.apache.blur.thrift.generated.RowMutation;
+import org.apache.blur.thrift.generated.TableDescriptor;
+import org.apache.blur.user.User;
+
+public class BlurClusterTestNoSecurityIT extends BlurClusterTestBase {
+
+  @Override
+  protected void setupTableProperties(TableDescriptor tableDescriptor) {
+    // do nothing
+  }
+
+  @Override
+  protected RowMutation mutate(RowMutation rowMutation) {
+    return rowMutation;
+  }
+
+  @Override
+  protected void postTableCreate(TableDescriptor tableDescriptor, Iface client) {
+
+  }
+
+  @Override
+  protected User getUser() {
+    return null;
+  }
+
+  @Override
+  protected Map<String, String> getUserAttributes() {
+    return new HashMap<String, String>();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestSecurity.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestSecurity.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestSecurity.java
deleted file mode 100644
index f3e01bf..0000000
--- a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestSecurity.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
-ing ok * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.blur.thrift;
-
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.generated.Blur.Iface;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.BlurQuery;
-import org.apache.blur.thrift.generated.BlurResult;
-import org.apache.blur.thrift.generated.BlurResults;
-import org.apache.blur.thrift.generated.Column;
-import org.apache.blur.thrift.generated.ColumnDefinition;
-import org.apache.blur.thrift.generated.FetchResult;
-import org.apache.blur.thrift.generated.FetchRowResult;
-import org.apache.blur.thrift.generated.Query;
-import org.apache.blur.thrift.generated.Record;
-import org.apache.blur.thrift.generated.RecordMutation;
-import org.apache.blur.thrift.generated.Row;
-import org.apache.blur.thrift.generated.RowMutation;
-import org.apache.blur.thrift.generated.RowMutationType;
-import org.apache.blur.thrift.generated.Selector;
-import org.apache.blur.thrift.generated.TableDescriptor;
-import org.apache.blur.thrift.util.BlurThriftHelper;
-import org.apache.blur.user.User;
-import org.apache.blur.user.UserContext;
-import org.apache.blur.utils.BlurConstants;
-import org.junit.Test;
-
-public class BlurClusterTestSecurity extends BlurClusterTestBase {
-
-  private static final String ACL_DISCOVER = "acl-discover";
-  private static final String TEST = "test";
-  private static final String ACL_READ = "acl-read";
-  private static final String DISCOVER = "discover";
-  private static final String READ = "read";
-
-  @Override
-  protected void setupTableProperties(TableDescriptor tableDescriptor) {
-    tableDescriptor.putToTableProperties(BlurConstants.BLUR_RECORD_SECURITY, "true");
-  }
-
-  @Override
-  protected RowMutation mutate(RowMutation rowMutation) {
-    List<RecordMutation> mutations = rowMutation.getRecordMutations();
-    for (RecordMutation mutation : mutations) {
-      Record record = mutation.getRecord();
-      record.addToColumns(new Column(ACL_READ, READ));
-      record.addToColumns(new Column(ACL_DISCOVER, DISCOVER));
-    }
-    return rowMutation;
-  }
-
-  @Override
-  protected void postTableCreate(TableDescriptor tableDescriptor, Iface client) {
-    String name = tableDescriptor.getName();
-    try {
-      client.addColumnDefinition(name, new ColumnDefinition(TEST, ACL_READ, null, false, ACL_READ, null, false));
-      client
-          .addColumnDefinition(name, new ColumnDefinition(TEST, ACL_DISCOVER, null, false, ACL_DISCOVER, null, false));
-    } catch (BlurException e) {
-      throw new RuntimeException(e);
-    } catch (TException e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  @Override
-  protected User getUser() {
-    return new User("testuser", getUserAttributes());
-  }
-
-  @Override
-  protected Map<String, String> getUserAttributes() {
-    Map<String, String> attributes = new HashMap<String, String>();
-    attributes.put(BlurConstants.ACL_READ, READ);
-    attributes.put(BlurConstants.ACL_DISCOVER, DISCOVER);
-    return attributes;
-  }
-
-  @Test
-  public void testSecurityReadOnlyRowQuery() throws BlurException, TException, IOException {
-    String tableName = "testSecurity1";
-    createTable(tableName);
-    Iface client = getClient();
-    String bulkId = UUID.randomUUID().toString();
-    client.bulkMutateStart(bulkId);
-    for (int i = 0; i < 1000; i++) {
-      RowMutation mutation1 = new RowMutation(tableName, getRowId(), RowMutationType.REPLACE_ROW, getRecordMutations(
-          "a", "a&b", "(a&b)|c"));
-      RowMutation mutation2 = new RowMutation(tableName, getRowId(), RowMutationType.REPLACE_ROW, getRecordMutations(
-          "b", "b&c", "a|(b&c)"));
-      RowMutation mutation3 = new RowMutation(tableName, getRowId(), RowMutationType.REPLACE_ROW, getRecordMutations(
-          "c", "c&a", "(a&c)|b"));
-      client.bulkMutateAddMultiple(bulkId, Arrays.asList(mutation1, mutation2, mutation3));
-    }
-    client.bulkMutateFinish(bulkId, true, true);
-
-    Map<String, String> attributes = new HashMap<String, String>();
-    attributes.put(BlurConstants.ACL_READ, "a");
-    User user = new User("testuser", attributes);
-
-    UserContext.setUser(user);
-    BlurQuery blurQuery = new BlurQuery();
-    Query query = new Query();
-    query.setRowQuery(true);
-    query.setQuery("test.test:value");
-    blurQuery.setQuery(query);
-    blurQuery.setSelector(new Selector());
-    BlurResults results = client.query(tableName, blurQuery);
-    assertEquals(2000, results.getTotalResults());
-
-    Set<String> aclChecks = new HashSet<String>();
-    aclChecks.add("a");
-    aclChecks.add("a|(b&c)");
-
-    for (BlurResult result : results.getResults()) {
-      FetchResult fetchResult = result.getFetchResult();
-      assertNotNull(fetchResult);
-      FetchRowResult rowResult = fetchResult.getRowResult();
-      assertNotNull(rowResult);
-      Row row = rowResult.getRow();
-      assertNotNull(row);
-      List<Record> records = row.getRecords();
-      assertEquals(1, records.size());
-      for (Record record : records) {
-        Column column = findColumn(record, ACL_READ);
-        String value = column.getValue();
-        assertTrue(aclChecks.contains(value));
-      }
-    }
-
-    UserContext.reset();
-  }
-
-  private Column findColumn(Record record, String name) {
-    for (Column column : record.getColumns()) {
-      if (column.getName().equals(name)) {
-        return column;
-      }
-    }
-    return null;
-  }
-
-  private List<RecordMutation> getRecordMutations(String... readAcls) {
-    List<RecordMutation> recordMutations = new ArrayList<RecordMutation>();
-    for (int i = 0; i < readAcls.length; i++) {
-      String recordId = Integer.toString(i);
-      RecordMutation recordMutation = BlurThriftHelper.newRecordMutation(TEST, recordId,
-          BlurThriftHelper.newColumn(TEST, "value"), BlurThriftHelper.newColumn(ACL_READ, readAcls[i]));
-      recordMutations.add(recordMutation);
-    }
-    return recordMutations;
-  }
-
-  private String getRowId() {
-    return UUID.randomUUID().toString();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestSecurityIT.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestSecurityIT.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestSecurityIT.java
new file mode 100644
index 0000000..12e66fb
--- /dev/null
+++ b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTestSecurityIT.java
@@ -0,0 +1,185 @@
+/**
+ing ok * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.blur.thrift;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+import org.apache.blur.thirdparty.thrift_0_9_0.TException;
+import org.apache.blur.thrift.generated.Blur.Iface;
+import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.BlurQuery;
+import org.apache.blur.thrift.generated.BlurResult;
+import org.apache.blur.thrift.generated.BlurResults;
+import org.apache.blur.thrift.generated.Column;
+import org.apache.blur.thrift.generated.ColumnDefinition;
+import org.apache.blur.thrift.generated.FetchResult;
+import org.apache.blur.thrift.generated.FetchRowResult;
+import org.apache.blur.thrift.generated.Query;
+import org.apache.blur.thrift.generated.Record;
+import org.apache.blur.thrift.generated.RecordMutation;
+import org.apache.blur.thrift.generated.Row;
+import org.apache.blur.thrift.generated.RowMutation;
+import org.apache.blur.thrift.generated.RowMutationType;
+import org.apache.blur.thrift.generated.Selector;
+import org.apache.blur.thrift.generated.TableDescriptor;
+import org.apache.blur.thrift.util.BlurThriftHelper;
+import org.apache.blur.user.User;
+import org.apache.blur.user.UserContext;
+import org.apache.blur.utils.BlurConstants;
+import org.junit.Test;
+
+public class BlurClusterTestSecurityIT extends BlurClusterTestBase {
+
+  private static final String ACL_DISCOVER = "acl-discover";
+  private static final String TEST = "test";
+  private static final String ACL_READ = "acl-read";
+  private static final String DISCOVER = "discover";
+  private static final String READ = "read";
+
+  @Override
+  protected void setupTableProperties(TableDescriptor tableDescriptor) {
+    tableDescriptor.putToTableProperties(BlurConstants.BLUR_RECORD_SECURITY, "true");
+  }
+
+  @Override
+  protected RowMutation mutate(RowMutation rowMutation) {
+    List<RecordMutation> mutations = rowMutation.getRecordMutations();
+    for (RecordMutation mutation : mutations) {
+      Record record = mutation.getRecord();
+      record.addToColumns(new Column(ACL_READ, READ));
+      record.addToColumns(new Column(ACL_DISCOVER, DISCOVER));
+    }
+    return rowMutation;
+  }
+
+  @Override
+  protected void postTableCreate(TableDescriptor tableDescriptor, Iface client) {
+    String name = tableDescriptor.getName();
+    try {
+      client.addColumnDefinition(name, new ColumnDefinition(TEST, ACL_READ, null, false, ACL_READ, null, false));
+      client
+          .addColumnDefinition(name, new ColumnDefinition(TEST, ACL_DISCOVER, null, false, ACL_DISCOVER, null, false));
+    } catch (BlurException e) {
+      throw new RuntimeException(e);
+    } catch (TException e) {
+      throw new RuntimeException(e);
+    }
+  }
+
+  @Override
+  protected User getUser() {
+    return new User("testuser", getUserAttributes());
+  }
+
+  @Override
+  protected Map<String, String> getUserAttributes() {
+    Map<String, String> attributes = new HashMap<String, String>();
+    attributes.put(BlurConstants.ACL_READ, READ);
+    attributes.put(BlurConstants.ACL_DISCOVER, DISCOVER);
+    return attributes;
+  }
+
+  @Test
+  public void testSecurityReadOnlyRowQuery() throws BlurException, TException, IOException {
+    String tableName = "testSecurity1";
+    createTable(tableName);
+    Iface client = getClient();
+    String bulkId = UUID.randomUUID().toString();
+    client.bulkMutateStart(bulkId);
+    for (int i = 0; i < 1000; i++) {
+      RowMutation mutation1 = new RowMutation(tableName, getRowId(), RowMutationType.REPLACE_ROW, getRecordMutations(
+          "a", "a&b", "(a&b)|c"));
+      RowMutation mutation2 = new RowMutation(tableName, getRowId(), RowMutationType.REPLACE_ROW, getRecordMutations(
+          "b", "b&c", "a|(b&c)"));
+      RowMutation mutation3 = new RowMutation(tableName, getRowId(), RowMutationType.REPLACE_ROW, getRecordMutations(
+          "c", "c&a", "(a&c)|b"));
+      client.bulkMutateAddMultiple(bulkId, Arrays.asList(mutation1, mutation2, mutation3));
+    }
+    client.bulkMutateFinish(bulkId, true, true);
+
+    Map<String, String> attributes = new HashMap<String, String>();
+    attributes.put(BlurConstants.ACL_READ, "a");
+    User user = new User("testuser", attributes);
+
+    UserContext.setUser(user);
+    BlurQuery blurQuery = new BlurQuery();
+    Query query = new Query();
+    query.setRowQuery(true);
+    query.setQuery("test.test:value");
+    blurQuery.setQuery(query);
+    blurQuery.setSelector(new Selector());
+    BlurResults results = client.query(tableName, blurQuery);
+    assertEquals(2000, results.getTotalResults());
+
+    Set<String> aclChecks = new HashSet<String>();
+    aclChecks.add("a");
+    aclChecks.add("a|(b&c)");
+
+    for (BlurResult result : results.getResults()) {
+      FetchResult fetchResult = result.getFetchResult();
+      assertNotNull(fetchResult);
+      FetchRowResult rowResult = fetchResult.getRowResult();
+      assertNotNull(rowResult);
+      Row row = rowResult.getRow();
+      assertNotNull(row);
+      List<Record> records = row.getRecords();
+      assertEquals(1, records.size());
+      for (Record record : records) {
+        Column column = findColumn(record, ACL_READ);
+        String value = column.getValue();
+        assertTrue(aclChecks.contains(value));
+      }
+    }
+
+    UserContext.reset();
+  }
+
+  private Column findColumn(Record record, String name) {
+    for (Column column : record.getColumns()) {
+      if (column.getName().equals(name)) {
+        return column;
+      }
+    }
+    return null;
+  }
+
+  private List<RecordMutation> getRecordMutations(String... readAcls) {
+    List<RecordMutation> recordMutations = new ArrayList<RecordMutation>();
+    for (int i = 0; i < readAcls.length; i++) {
+      String recordId = Integer.toString(i);
+      RecordMutation recordMutation = BlurThriftHelper.newRecordMutation(TEST, recordId,
+          BlurThriftHelper.newColumn(TEST, "value"), BlurThriftHelper.newColumn(ACL_READ, readAcls[i]));
+      recordMutations.add(recordMutation);
+    }
+    return recordMutations;
+  }
+
+  private String getRowId() {
+    return UUID.randomUUID().toString();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/FacetTests.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/FacetTests.java b/blur-core/src/test/java/org/apache/blur/thrift/FacetTests.java
deleted file mode 100644
index d6f858e..0000000
--- a/blur-core/src/test/java/org/apache/blur/thrift/FacetTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package org.apache.blur.thrift;
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.generated.BlurException;
-import org.apache.blur.thrift.generated.BlurResults;
-import org.junit.Test;
-
-public class FacetTests extends BaseClusterTest {
-
-  @Test
-  public void testQueryWithFacets() throws BlurException, TException, IOException, InterruptedException {
-    String table = "testQueryWithFacets";
-    TableGen.define(table)
-      .cols("test", "string:facet")
-      .addRow(20, "r1", "rec###", "value-###")
-      .build(getClient());
-    
-    QueryBuilder qb = QueryBuilder.define("*");
-    for (int i = 0; i < 250; i++) {
-      qb.withFacet("test.facet:" + i, Long.MAX_VALUE);
-    }
-
-    BlurResults resultsRow = qb.run(table, getClient());
-    assertEquals(1, resultsRow.getTotalResults());
-  }
-
-  
-  @Test
-  public void testQueryWithFacetsWithMins() throws BlurException, TException, IOException, InterruptedException {
-    final String tableName = "testQueryWithFacetsWithMins";
-    int numberOfRows = 100;
-    
-    TableGen.define(tableName)
-    .cols("test", "string:facet", "string:facetFixed")
-    .addRows(numberOfRows, 20, "r1", "rec###", "value-###", "test")
-    .build(getClient());
-    
-    
-    BlurResults resultsRow = QueryBuilder.define("*")
-        .withFacet("test.facetFixed:test", 50)
-        .run(tableName, getClient());
-
-    assertEquals(numberOfRows, resultsRow.getTotalResults());
-
-    List<Long> facetCounts = resultsRow.getFacetCounts();
-    for (Long l : facetCounts) {
-      assertTrue(l >= 50);
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/FacetTestsIT.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/FacetTestsIT.java b/blur-core/src/test/java/org/apache/blur/thrift/FacetTestsIT.java
new file mode 100644
index 0000000..25ab875
--- /dev/null
+++ b/blur-core/src/test/java/org/apache/blur/thrift/FacetTestsIT.java
@@ -0,0 +1,72 @@
+package org.apache.blur.thrift;
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.blur.thirdparty.thrift_0_9_0.TException;
+import org.apache.blur.thrift.generated.BlurException;
+import org.apache.blur.thrift.generated.BlurResults;
+import org.junit.Test;
+
+public class FacetTestsIT extends BaseClusterTest {
+
+  @Test
+  public void testQueryWithFacets() throws BlurException, TException, IOException, InterruptedException {
+    String table = "testQueryWithFacets";
+    TableGen.define(table)
+      .cols("test", "string:facet")
+      .addRow(20, "r1", "rec###", "value-###")
+      .build(getClient());
+    
+    QueryBuilder qb = QueryBuilder.define("*");
+    for (int i = 0; i < 250; i++) {
+      qb.withFacet("test.facet:" + i, Long.MAX_VALUE);
+    }
+
+    BlurResults resultsRow = qb.run(table, getClient());
+    assertEquals(1, resultsRow.getTotalResults());
+  }
+
+  
+  @Test
+  public void testQueryWithFacetsWithMins() throws BlurException, TException, IOException, InterruptedException {
+    final String tableName = "testQueryWithFacetsWithMins";
+    int numberOfRows = 100;
+    
+    TableGen.define(tableName)
+    .cols("test", "string:facet", "string:facetFixed")
+    .addRows(numberOfRows, 20, "r1", "rec###", "value-###", "test")
+    .build(getClient());
+    
+    
+    BlurResults resultsRow = QueryBuilder.define("*")
+        .withFacet("test.facetFixed:test", 50)
+        .run(tableName, getClient());
+
+    assertEquals(numberOfRows, resultsRow.getTotalResults());
+
+    List<Long> facetCounts = resultsRow.getFacetCounts();
+    for (Long l : facetCounts) {
+      assertTrue(l >= 50);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/IntegrationTestSuite.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/IntegrationTestSuite.java b/blur-core/src/test/java/org/apache/blur/thrift/IntegrationTestSuite.java
index 6ded4ea..828ea0b 100644
--- a/blur-core/src/test/java/org/apache/blur/thrift/IntegrationTestSuite.java
+++ b/blur-core/src/test/java/org/apache/blur/thrift/IntegrationTestSuite.java
@@ -1,4 +1,5 @@
 package org.apache.blur.thrift;
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -28,37 +29,30 @@ import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 
 @RunWith(Suite.class)
-@Suite.SuiteClasses({ TermsTests.class, FacetTests.class })
+@Suite.SuiteClasses({ TermsTestsIT.class, FacetTestsIT.class })
 public class IntegrationTestSuite {
   @ClassRule
   public static ExternalResource testCluster = new ExternalResource() {
 
-    private boolean _managing;
-
     @Override
     protected void after() {
-      if (_managing) {
-        try {
-          SuiteCluster.shutdownMiniCluster();
-        } catch (IOException e) {
-          throw new RuntimeException(e);
-        }
+      try {
+        SuiteCluster.shutdownMiniCluster(IntegrationTestSuite.class);
+      } catch (IOException e) {
+        throw new RuntimeException(e);
       }
     }
 
     @Override
     protected void before() throws Throwable {
-      if (!SuiteCluster.isClusterSetup()) {
-        _managing = true;
-        try {
-          SuiteCluster.setupMiniCluster();
-        } catch (IOException e) {
-          throw new RuntimeException(e);
-        }
+      try {
+        SuiteCluster.setupMiniCluster(IntegrationTestSuite.class);
+      } catch (IOException e) {
+        throw new RuntimeException(e);
       }
     }
   };
-  
+
   @After
   public void tearDown() throws BlurException, TException, IOException {
     Iface client = SuiteCluster.getClient();

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/SuiteCluster.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/SuiteCluster.java b/blur-core/src/test/java/org/apache/blur/thrift/SuiteCluster.java
index 26f7494..c04f670 100644
--- a/blur-core/src/test/java/org/apache/blur/thrift/SuiteCluster.java
+++ b/blur-core/src/test/java/org/apache/blur/thrift/SuiteCluster.java
@@ -1,4 +1,5 @@
 package org.apache.blur.thrift;
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -16,23 +17,48 @@ package org.apache.blur.thrift;
  * limitations under the License.
  */
 import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
 import java.io.IOException;
 
 import org.apache.blur.BlurConfiguration;
 import org.apache.blur.MiniCluster;
 import org.apache.blur.thrift.generated.Blur.Iface;
 import org.apache.blur.utils.BlurConstants;
+import org.apache.blur.utils.GCWatcher;
+import org.apache.blur.utils.JavaHome;
+import org.apache.blur.zookeeper.ZkUtils;
+import org.apache.blur.zookeeper.ZooKeeperClient;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+
+import com.google.common.base.Splitter;
 
 public class SuiteCluster {
-  private static final Log log = LogFactory.getLog(SuiteCluster.class);
+
+  private static final String SEPARATOR = ":";
+  private static final String JAVA_CLASS_PATH = "java.class.path";
+  private static final String TEST_CLASSES = "test-classes";
+
+  public static final String YARN_SITE_XML = "yarn-site.xml";
+  public static final String MAPRED_SITE_XML = "mapred-site.xml";
+
   private static final File TMPDIR = new File(System.getProperty("blur.tmp.dir", "./target/tmp_SuiteCluster"));
   private static MiniCluster cluster;
+  public static boolean externalProcesses = false;
+  private static Class<?> _setupClass = null;
 
-  public static void shutdownMiniCluster() throws IOException {
-    if (cluster != null) {
+  static {
+    GCWatcher.init(0.60);
+  }
+
+  public static void shutdownMiniCluster(Class<?> setupClass) throws IOException {
+    if (cluster != null && _setupClass.equals(setupClass)) {
+      removeSiteFiles();
+      cluster.shutdownMrMiniCluster();
       cluster.shutdownBlurCluster();
       File file = new File(TMPDIR, "blur-cluster-test");
       if (file.exists()) {
@@ -42,17 +68,57 @@ public class SuiteCluster {
     }
   }
 
-  public static void setupMiniCluster() throws IOException {
+  public synchronized static void setupMiniCluster(Class<?> setupClass) throws IOException {
+    if (SuiteCluster.isClusterSetup()) {
+      return;
+    }
+    JavaHome.checkJavaHome();
     File testDirectory = new File(TMPDIR, "blur-cluster-test").getAbsoluteFile();
     testDirectory.mkdirs();
-
     testDirectory.delete();
     if (cluster == null) {
+      _setupClass = setupClass;
+      removeSiteFiles();
       cluster = new MiniCluster();
-      cluster.startBlurCluster(new File(testDirectory, "cluster").getAbsolutePath(), 2, 3, true, false);
-
+      cluster.startBlurCluster(new File(testDirectory, "cluster").getAbsolutePath(), 2, 2, true, externalProcesses);
+      cluster.startMrMiniCluster();
+      writeSiteFiles(cluster.getMRConfiguration());
       System.out.println("MiniCluster started at " + cluster.getControllerConnectionStr());
+    }
+  }
+
+  private static void writeSiteFiles(Configuration configuration) throws IOException {
+    String name = MAPRED_SITE_XML;
+    if (cluster.useYarn()) {
+      name = YARN_SITE_XML;
+    }
+    String classPath = System.getProperty(JAVA_CLASS_PATH);
+    for (String path : Splitter.on(SEPARATOR).split(classPath)) {
+      File file = new File(path);
+      if (file.getName().equals(TEST_CLASSES)) {
+        writeFile(new File(file, name), configuration);
+        return;
+      }
+    }
+  }
+
+  private static void writeFile(File file, Configuration configuration) throws FileNotFoundException, IOException {
+    FileOutputStream outputStream = new FileOutputStream(file);
+    configuration.writeXml(outputStream);
+    outputStream.close();
+  }
 
+  private static void removeSiteFiles() throws IOException {
+    String classPath = System.getProperty(JAVA_CLASS_PATH);
+    for (String path : Splitter.on(SEPARATOR).split(classPath)) {
+      File file = new File(path);
+      if (file.getName().equals(TEST_CLASSES)) {
+        File f1 = new File(file, MAPRED_SITE_XML);
+        File f2 = new File(file, YARN_SITE_XML);
+        f1.delete();
+        f2.delete();
+        return;
+      }
     }
   }
 
@@ -63,20 +129,56 @@ public class SuiteCluster {
     return BlurClient.getClient(blurConfiguration);
   }
 
+  public Configuration getMRConfiguration() {
+    return cluster.getMRConfiguration();
+  }
+
+  public Configuration getHdfsConfiguration() {
+    return cluster.getConfiguration();
+  }
+
   public static boolean isClusterSetup() {
     return cluster != null;
   }
 
-  public static String getFileSystemUri() {
-    try {
-      return cluster.getFileSystemUri().toString();
-    } catch (IOException e) {
-      throw new RuntimeException(e);
-    }
+  public static FileSystem getFileSystem() throws IOException {
+    return cluster.getFileSystem();
+  }
+
+  public static String getFileSystemUri() throws IOException {
+    return cluster.getFileSystemUri().toString();
   }
 
   public static String getZooKeeperConnStr() {
     return cluster.getZkConnectionString();
   }
 
+  public static String getControllerConnectionStr() {
+    return cluster.getControllerConnectionStr();
+  }
+
+  public static MiniCluster getMiniCluster() {
+    return cluster;
+  }
+
+  public static String getZooKeeperConnStr(Class<?> clazz) throws IOException {
+    String name = clazz.getName();
+    String zooKeeperConnStr = getZooKeeperConnStr();
+    ZooKeeperClient zk = new ZooKeeperClient(zooKeeperConnStr, 30000, new Watcher() {
+      @Override
+      public void process(WatchedEvent event) {
+
+      }
+    });
+    String path = "/" + name.replace(".", "_");
+    ZkUtils.mkNodesStr(zk, path);
+    try {
+      zk.close();
+    } catch (InterruptedException e) {
+      throw new IOException(e);
+    }
+    String zkConn = zooKeeperConnStr + path;
+    return zkConn;
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/TableGen.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/TableGen.java b/blur-core/src/test/java/org/apache/blur/thrift/TableGen.java
index b925ce4..216b701 100644
--- a/blur-core/src/test/java/org/apache/blur/thrift/TableGen.java
+++ b/blur-core/src/test/java/org/apache/blur/thrift/TableGen.java
@@ -15,6 +15,7 @@ package org.apache.blur.thrift;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+import java.io.IOException;
 import java.util.List;
 import java.util.Map;
 
@@ -138,7 +139,7 @@ public class TableGen {
     return this;
   }
 
-  public void build(Iface client) throws BlurException, TException {
+  public void build(Iface client) throws BlurException, TException, IOException {
     TableDescriptor tbl = new TableDescriptor();
     tbl.setName(table);
     tbl.setShardCount(shardCount);

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/TermsTests.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/TermsTests.java b/blur-core/src/test/java/org/apache/blur/thrift/TermsTests.java
deleted file mode 100644
index a17236a..0000000
--- a/blur-core/src/test/java/org/apache/blur/thrift/TermsTests.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package org.apache.blur.thrift;
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.blur.thirdparty.thrift_0_9_0.TException;
-import org.apache.blur.thrift.generated.BlurException;
-import org.junit.Test;
-
-import com.google.common.collect.Lists;
-
-public class TermsTests extends BaseClusterTest {
-  
-  @Test
-  public void testTermsList() throws BlurException, TException, IOException, InterruptedException {
-    final String tableName = "testTermsList";
-    TableGen.define(tableName).cols("test", "col1")
-        .addRows(100, 20, "r1", "rec-###", "value").build(getClient());
-
-    List<String> terms = getClient().terms(tableName, "test", "col1", null, (short) 10);
-    List<String> list = Lists.newArrayList("value");
-    
-    assertEquals(list, terms);
-  }
-  
-  @Test
-  public void shouldBeAbleToSkipToTerms() throws Exception {
-    final String tableName = "shouldBeAbleToNavigateTerms";
-    TableGen.define(tableName)
-      .cols("test", "col1")
-      .addRecord("1","1", "aaa")
-      .addRecord("2","2", "bbb")
-      .addRecord("3","3", "ccc")
-      .addRecord("4","4", "ddd")
-      .build(getClient());
-    
-    List<String> terms = getClient().terms(tableName, "test", "col1", "c", (short)10);
-    List<String> expected = Lists.newArrayList("ccc", "ddd");
-    
-    assertEquals(expected, terms);
-  }
-  
-  @Test
-  public void shouldOnlyReturnNumberOfTermsRequested() throws Exception {
-    final String tableName = "shouldOnlyReturnNumberOfTermsRequested";
-    TableGen.define(tableName)
-      .cols("test", "col1")
-      .addRecord("1","1", "aaa")
-      .addRecord("2","2", "bbb")
-      .addRecord("3","3", "ccc")
-      .addRecord("4","4", "ddd")
-      .build(getClient());
-    
-    List<String> terms = getClient().terms(tableName, "test", "col1", "c", (short)1);
-    List<String> expected = Lists.newArrayList("ccc");
-    
-    assertEquals(expected, terms);
-  }
-  
-  @Test
-  public void shouldGetEmptyListForNonExistentTerms() throws Exception {
-    final String tableName = "shouldGetEmptyListForNonExistantTerms";
-    TableGen.define(tableName)
-      .cols("test", "col1")
-      .addRecord("1","1", "aaa")
-      .addRecord("2","2", "bbb")
-      .addRecord("3","3", "ccc")
-      .addRecord("4","4", "ddd")
-      .build(getClient());
-    
-    List<String> terms = getClient().terms(tableName, "test", "col1", "z", (short)1);
-    assertNotNull(terms);
-    assertEquals(0, terms.size());
-  }
-  
-  @Test(expected=BlurException.class)
-  public void termsShouldFailOnUnknownTable() throws BlurException, TException, IOException {
-    getClient().terms("termsShouldFailOnUnknownTable", "test","col1", null, (short)10);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/TermsTestsIT.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/TermsTestsIT.java b/blur-core/src/test/java/org/apache/blur/thrift/TermsTestsIT.java
new file mode 100644
index 0000000..122a744
--- /dev/null
+++ b/blur-core/src/test/java/org/apache/blur/thrift/TermsTestsIT.java
@@ -0,0 +1,99 @@
+package org.apache.blur.thrift;
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.blur.thirdparty.thrift_0_9_0.TException;
+import org.apache.blur.thrift.generated.BlurException;
+import org.junit.Test;
+
+import com.google.common.collect.Lists;
+
+public class TermsTestsIT extends BaseClusterTest {
+  
+  @Test
+  public void testTermsList() throws BlurException, TException, IOException, InterruptedException {
+    final String tableName = "testTermsList";
+    TableGen.define(tableName).cols("test", "col1")
+        .addRows(100, 20, "r1", "rec-###", "value").build(getClient());
+
+    List<String> terms = getClient().terms(tableName, "test", "col1", null, (short) 10);
+    List<String> list = Lists.newArrayList("value");
+    
+    assertEquals(list, terms);
+  }
+  
+  @Test
+  public void shouldBeAbleToSkipToTerms() throws Exception {
+    final String tableName = "shouldBeAbleToNavigateTerms";
+    TableGen.define(tableName)
+      .cols("test", "col1")
+      .addRecord("1","1", "aaa")
+      .addRecord("2","2", "bbb")
+      .addRecord("3","3", "ccc")
+      .addRecord("4","4", "ddd")
+      .build(getClient());
+    
+    List<String> terms = getClient().terms(tableName, "test", "col1", "c", (short)10);
+    List<String> expected = Lists.newArrayList("ccc", "ddd");
+    
+    assertEquals(expected, terms);
+  }
+  
+  @Test
+  public void shouldOnlyReturnNumberOfTermsRequested() throws Exception {
+    final String tableName = "shouldOnlyReturnNumberOfTermsRequested";
+    TableGen.define(tableName)
+      .cols("test", "col1")
+      .addRecord("1","1", "aaa")
+      .addRecord("2","2", "bbb")
+      .addRecord("3","3", "ccc")
+      .addRecord("4","4", "ddd")
+      .build(getClient());
+    
+    List<String> terms = getClient().terms(tableName, "test", "col1", "c", (short)1);
+    List<String> expected = Lists.newArrayList("ccc");
+    
+    assertEquals(expected, terms);
+  }
+  
+  @Test
+  public void shouldGetEmptyListForNonExistentTerms() throws Exception {
+    final String tableName = "shouldGetEmptyListForNonExistantTerms";
+    TableGen.define(tableName)
+      .cols("test", "col1")
+      .addRecord("1","1", "aaa")
+      .addRecord("2","2", "bbb")
+      .addRecord("3","3", "ccc")
+      .addRecord("4","4", "ddd")
+      .build(getClient());
+    
+    List<String> terms = getClient().terms(tableName, "test", "col1", "z", (short)1);
+    assertNotNull(terms);
+    assertEquals(0, terms.size());
+  }
+  
+  @Test(expected=BlurException.class)
+  public void termsShouldFailOnUnknownTable() throws BlurException, TException, IOException {
+    getClient().terms("termsShouldFailOnUnknownTable", "test","col1", null, (short)10);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/ThriftServerTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/ThriftServerTest.java b/blur-core/src/test/java/org/apache/blur/thrift/ThriftServerTest.java
deleted file mode 100644
index e451c20..0000000
--- a/blur-core/src/test/java/org/apache/blur/thrift/ThriftServerTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.apache.blur.thrift;
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-
-import org.apache.blur.BlurConfiguration;
-import org.apache.blur.utils.BlurConstants;
-import org.apache.blur.zookeeper.ZkUtils;
-import org.apache.blur.zookeeper.ZookeeperPathConstants;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.ZooKeeper;
-import org.junit.Test;
-
-public class ThriftServerTest extends BaseClusterTest {
-
-  @Test
-  public void testRootedZkPath() throws IOException, KeeperException, InterruptedException {
-    ZooKeeper zk = null;
-    ZooKeeper nonRooted = null;
-    try {
-      BlurConfiguration conf = new BlurConfiguration();
-      conf.set(BlurConstants.BLUR_ZOOKEEPER_CONNECTION, getZkConnString() + "/rooted");
-      zk = ThriftServer.setupZookeeper(conf, "default");
-
-      assertNotNull("Should be addressable via rooted path",
-          zk.exists(ZookeeperPathConstants.getClusterPath("default"), false));
-
-      nonRooted = ZkUtils.newZooKeeper(getZkConnString(), 10000);
-      assertTrue("Should really be rooted.",
-          ZkUtils.exists(nonRooted, "/rooted" + ZookeeperPathConstants.getClusterPath("default")));
-    } finally {
-      if (zk != null) {
-        zk.close();
-      }
-      if(nonRooted != null) {
-        nonRooted.close();
-      }
-    }
-  }
-  @Test
-  public void testNonRootedZkPathWithSlash() throws IOException, KeeperException, InterruptedException {
-    ZooKeeper zk = null;
-    ZooKeeper nonRooted = null;
-    try {
-      BlurConfiguration conf = new BlurConfiguration();
-      conf.set(BlurConstants.BLUR_ZOOKEEPER_CONNECTION, getZkConnString() + "/");
-      zk = ThriftServer.setupZookeeper(conf, "default");
-
-      nonRooted = ZkUtils.newZooKeeper(getZkConnString(), 10000);
-      assertTrue("Should really be rooted.",
-          ZkUtils.exists(nonRooted,  ZookeeperPathConstants.getClusterPath("default")));
-    } finally {
-      if (zk != null) {
-        zk.close();
-      }
-      if(nonRooted != null) {
-        nonRooted.close();
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-core/src/test/java/org/apache/blur/thrift/ThriftServerTestIT.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/ThriftServerTestIT.java b/blur-core/src/test/java/org/apache/blur/thrift/ThriftServerTestIT.java
new file mode 100644
index 0000000..5ab3b43
--- /dev/null
+++ b/blur-core/src/test/java/org/apache/blur/thrift/ThriftServerTestIT.java
@@ -0,0 +1,78 @@
+package org.apache.blur.thrift;
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+
+import org.apache.blur.BlurConfiguration;
+import org.apache.blur.utils.BlurConstants;
+import org.apache.blur.zookeeper.ZkUtils;
+import org.apache.blur.zookeeper.ZookeeperPathConstants;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.ZooKeeper;
+import org.junit.Test;
+
+public class ThriftServerTestIT extends BaseClusterTest {
+
+  @Test
+  public void testRootedZkPath() throws IOException, KeeperException, InterruptedException {
+    ZooKeeper zk = null;
+    ZooKeeper nonRooted = null;
+    try {
+      BlurConfiguration conf = new BlurConfiguration();
+      conf.set(BlurConstants.BLUR_ZOOKEEPER_CONNECTION, getZkConnString() + "/rooted");
+      zk = ThriftServer.setupZookeeper(conf, "default");
+
+      assertNotNull("Should be addressable via rooted path",
+          zk.exists(ZookeeperPathConstants.getClusterPath("default"), false));
+
+      nonRooted = ZkUtils.newZooKeeper(getZkConnString(), 10000);
+      assertTrue("Should really be rooted.",
+          ZkUtils.exists(nonRooted, "/rooted" + ZookeeperPathConstants.getClusterPath("default")));
+    } finally {
+      if (zk != null) {
+        zk.close();
+      }
+      if(nonRooted != null) {
+        nonRooted.close();
+      }
+    }
+  }
+  @Test
+  public void testNonRootedZkPathWithSlash() throws IOException, KeeperException, InterruptedException {
+    ZooKeeper zk = null;
+    ZooKeeper nonRooted = null;
+    try {
+      BlurConfiguration conf = new BlurConfiguration();
+      conf.set(BlurConstants.BLUR_ZOOKEEPER_CONNECTION, getZkConnString() + "/");
+      zk = ThriftServer.setupZookeeper(conf, "default");
+
+      nonRooted = ZkUtils.newZooKeeper(getZkConnString(), 10000);
+      assertTrue("Should really be rooted.",
+          ZkUtils.exists(nonRooted,  ZookeeperPathConstants.getClusterPath("default")));
+    } finally {
+      if (zk != null) {
+        zk.close();
+      }
+      if(nonRooted != null) {
+        nonRooted.close();
+      }
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/d8756092/blur-hive/pom.xml
----------------------------------------------------------------------
diff --git a/blur-hive/pom.xml b/blur-hive/pom.xml
index 8d2044f..4ed3cc1 100644
--- a/blur-hive/pom.xml
+++ b/blur-hive/pom.xml
@@ -105,12 +105,24 @@
 		<plugins>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<executions>
+					<execution>
+						<goals>
+							<goal>test-jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-source-plugin</artifactId>
 				<executions>
 					<execution>
 						<id>attach-sources</id>
 						<goals>
 							<goal>jar</goal>
+							<goal>test-jar</goal>
 						</goals>
 					</execution>
 				</executions>


Mime
View raw message