HBASE-23956 Use less resources running tests (#1266)
Addendum: TestMultiParallel thread counts were off after parent change.
This commit is contained in:
parent
4214a4f0b9
commit
6a30b4eab4
|
@ -181,6 +181,9 @@ public class TestMultiParallel {
|
||||||
@Test
|
@Test
|
||||||
public void testActiveThreadsCount() throws Exception {
|
public void testActiveThreadsCount() throws Exception {
|
||||||
UTIL.getConfiguration().setLong("hbase.htable.threads.coresize", slaves + 1);
|
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())) {
|
try (Connection connection = ConnectionFactory.createConnection(UTIL.getConfiguration())) {
|
||||||
ThreadPoolExecutor executor = HTable.getDefaultExecutor(UTIL.getConfiguration());
|
ThreadPoolExecutor executor = HTable.getDefaultExecutor(UTIL.getConfiguration());
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue