commit | 4077fd869f4786619e7f03aa353b390c15c8934d | [log] [tgz] |
---|---|---|
author | Chris Hillery <ceej+github@lambda.nu> | Mon Mar 03 23:26:21 2014 -0800 |
committer | Chris Hillery <ceej+github@lambda.nu> | Mon Mar 03 23:26:21 2014 -0800 |
tree | 6b8e89a71fd35b2808938ad3fdf9e6d3fea535b3 | |
parent | 6237e7a6cddd588face1e14fa8006e27e444070e [diff] |
Ensure batchSize > 0 even when running with very many CPU cores
diff --git a/hyracks/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/storage/am/btree/OrderedIndexMultiThreadTest.java b/hyracks/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/storage/am/btree/OrderedIndexMultiThreadTest.java index e37a95d..87fd1e1 100644 --- a/hyracks/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/storage/am/btree/OrderedIndexMultiThreadTest.java +++ b/hyracks/hyracks-test-support/src/main/java/edu/uci/ics/hyracks/storage/am/btree/OrderedIndexMultiThreadTest.java
@@ -86,7 +86,11 @@ // 4 batches per thread. int batchSize = (NUM_OPERATIONS / numThreads) / 4; - + if (batchSize < 1) { + // Can happen on a machine with large number of CPU cores, like + // the Jenkins server + batchSize = 1; + } IndexMultiThreadTestDriver driver = new IndexMultiThreadTestDriver(index, workerFactory, fieldSerdes, conf.ops, conf.opProbs); driver.init();