From fdc08e1dfe81287a83f988f845ec786705417e0a Mon Sep 17 00:00:00 2001 From: Ben Visness Date: Tue, 30 Sep 2025 15:04:33 -0500 Subject: [PATCH] Fix testIterationCount and testWorstCaseCount params These params were using the names iterationCount and worstCaseCount, which are names not used in the code and which therefore result in unexpected behavior in various cases. For example, the cli flags --iteration-count and --worst-case-count were being totally ignored, and the DefaultJetStreamParams fallback behavior in _parseIntParam was looking up a nonexistent key. --- params.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/params.js b/params.js index fa043864..ae2ed620 100644 --- a/params.js +++ b/params.js @@ -73,8 +73,8 @@ class Params { for (const paramKey of ["tag", "tags", "test", "tests"]) this.testList = this._parseTestListParam(sourceParams, paramKey); - this.testIterationCount = this._parseIntParam(sourceParams, "iterationCount", 1); - this.testWorstCaseCount = this._parseIntParam(sourceParams, "worstCaseCount", 1); + this.testIterationCount = this._parseIntParam(sourceParams, "testIterationCount", 1); + this.testWorstCaseCount = this._parseIntParam(sourceParams, "testWorstCaseCount", 1); const unused = Array.from(sourceParams.keys()); if (unused.length > 0) @@ -128,7 +128,7 @@ class Params { const number = Number(value); if (!Number.isInteger(number) && errorMessage) throw new Error(`Invalid ${errorMessage} param: '${value}', expected int.`); - return parseInt(number); + return number; } get isDefault() {