From 6a30b4eab4a59a9ef079e322709917b7caf01813 Mon Sep 17 00:00:00 2001 From: stack Date: Wed, 11 Mar 2020 22:08:31 -0700 Subject: [PATCH] HBASE-23956 Use less resources running tests (#1266) Addendum: TestMultiParallel thread counts were off after parent change. --- .../java/org/apache/hadoop/hbase/client/TestMultiParallel.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java index 7d36e99583d..84c90de4234 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java @@ -181,6 +181,9 @@ public class TestMultiParallel { @Test public void testActiveThreadsCount() throws Exception { UTIL.getConfiguration().setLong("hbase.htable.threads.coresize", slaves + 1); + // Make sure max is at least as big as coresize; can be smaller in test context where + // we tune down thread sizes -- max could be < slaves + 1. + UTIL.getConfiguration().setLong("hbase.htable.threads.max", slaves + 1); try (Connection connection = ConnectionFactory.createConnection(UTIL.getConfiguration())) { ThreadPoolExecutor executor = HTable.getDefaultExecutor(UTIL.getConfiguration()); try {