HBASE-23956 Use less resources running tests (#1266)

Addendum: TestMultiParallel thread counts were off after
parent change.
This commit is contained in:
stack 2020-03-11 22:08:31 -07:00
parent 4214a4f0b9
commit 6a30b4eab4
1 changed files with 3 additions and 0 deletions

View File

@ -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 {