Fix #2782, Unit test failed for DruidProcessingConfigTest.testDeserialization (#3231)

On systems with only once processor this test fails.
This commit is contained in:
Erik Dubbelboer 2016-07-26 00:51:09 +02:00 committed by Fangjin Yang
parent 3dc2974894
commit 76fabcfdb2
1 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,11 @@ public class DruidProcessingConfigTest
Assert.assertEquals(1024 * 1024 * 1024, config.intermediateComputeSizeBytes());
Assert.assertEquals(Integer.MAX_VALUE, config.poolCacheMaxCount());
Assert.assertTrue(config.getNumThreads() < Runtime.getRuntime().availableProcessors());
if (Runtime.getRuntime().availableProcessors() == 1) {
Assert.assertTrue(config.getNumThreads() == 1);
} else {
Assert.assertTrue(config.getNumThreads() < Runtime.getRuntime().availableProcessors());
}
Assert.assertEquals(0, config.columnCacheSizeBytes());
Assert.assertFalse(config.isFifo());