From c35e374ef4f9dd6d81e88646d77813cc67936b81 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Wed, 29 Jun 2016 13:17:31 -0700 Subject: [PATCH] runtests-parallel skips empty buckets Previously, it would enter them as buckets with no tests, which would make our test runners run *every* test. This was very obvious on machines with lots of cores. --- src/harness/runner.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/harness/runner.ts b/src/harness/runner.ts index 1c36614e61f..4b1945f5baa 100644 --- a/src/harness/runner.ts +++ b/src/harness/runner.ts @@ -193,7 +193,7 @@ if (taskConfigsFolder) { for (let i = 0; i < workerCount; i++) { const startPos = i * chunkSize; const len = Math.min(chunkSize, files.length - startPos); - if (len !== 0) { + if (len > 0) { workerConfigs[i].tasks.push({ runner: runner.kind(), files: files.slice(startPos, startPos + len) @@ -214,5 +214,5 @@ else { } if (!runUnitTests) { // patch `describe` to skip unit tests - describe = describe.skip; -} \ No newline at end of file + describe = (function () { }); +}