Parallel runner shouldnt print nan and freeze on unestimatable tests when above batch count (#20176)

This commit is contained in:
Wesley Wigham 2017-11-20 15:47:46 -08:00 committed by GitHub
parent 2c8e49f32e
commit 71ceb91c9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,8 +208,8 @@ namespace Harness.Parallel.Host {
workers.push(child); workers.push(child);
} }
// It's only really worth doing an initial batching if there are a ton of files to go through // It's only really worth doing an initial batching if there are a ton of files to go through (and they have estimates)
if (totalFiles > 1000) { if (totalFiles > 1000 && batchSize > 0) {
console.log("Batching initial test lists..."); console.log("Batching initial test lists...");
const batches: { runner: TestRunnerKind | "unittest", file: string, size: number }[][] = new Array(batchCount); const batches: { runner: TestRunnerKind | "unittest", file: string, size: number }[][] = new Array(batchCount);
const doneBatching = new Array(batchCount); const doneBatching = new Array(batchCount);