Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 948df30e3 -> 7ea7aca1a
PHOENIX-4110 Addendum to make tear down of mini cluster synchronous for 4.x-HBase-0.98 branch Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/7ea7aca1 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/7ea7aca1 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/7ea7aca1 Branch: refs/heads/4.x-HBase-0.98 Commit: 7ea7aca1a2f60ce67eec64a64256f461666931c9 Parents: 948df30 Author: Samarth Jain <[email protected]> Authored: Sat Sep 2 23:47:28 2017 -0700 Committer: Samarth Jain <[email protected]> Committed: Sat Sep 2 23:47:28 2017 -0700 ---------------------------------------------------------------------- .../java/org/apache/phoenix/query/BaseTest.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/7ea7aca1/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java index 0b72163..dc6f4c9 100644 --- a/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java +++ b/phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java @@ -149,6 +149,7 @@ import org.slf4j.LoggerFactory; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.collect.Sets; +import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.ThreadFactoryBuilder; /** @@ -401,20 +402,7 @@ public abstract class BaseTest { private static HBaseTestingUtility utility; protected static final Configuration config = HBaseConfiguration.create(); - private static class TearDownMiniClusterThreadFactory implements ThreadFactory { - private static final AtomicInteger threadNumber = new AtomicInteger(1); - private static final String NAME_PREFIX = "PHOENIX-TEARDOWN-MINICLUSTER-thread-"; - - @Override - public Thread newThread(Runnable r) { - Thread t = new Thread(r, NAME_PREFIX + threadNumber.getAndIncrement()); - t.setDaemon(true); - return t; - } - } - - private static ExecutorService tearDownClusterService = - Executors.newSingleThreadExecutor(new TearDownMiniClusterThreadFactory()); + private static ExecutorService tearDownClusterService = MoreExecutors.sameThreadExecutor(); protected static String getUrl() { if (!clusterInitialized) {
