@nsshunt/ststestrunner 1.1.138 → 1.1.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -984,8 +984,6 @@ var TestCaseFhirBase = class {
984
984
  #publishTelemetryTimeout = null;
985
985
  #publishTelemetryTimeoutVal = 1e3;
986
986
  randomSequence = [];
987
- _currentWorkerManagerIndex = 0;
988
- _indexTable = {};
989
987
  _RetryMap = [
990
988
  100,
991
989
  250,
@@ -1190,6 +1188,14 @@ var TestCaseFhirBase = class {
1190
1188
  await this.#ForcePublishTelemetryData();
1191
1189
  return true;
1192
1190
  };
1191
+ hashString(str) {
1192
+ let hash = 2166136261;
1193
+ for (let i = 0; i < str.length; i++) {
1194
+ hash ^= str.charCodeAt(i);
1195
+ hash = Math.imul(hash, 16777619);
1196
+ }
1197
+ return hash >>> 0;
1198
+ }
1193
1199
  _GetDetail = () => {
1194
1200
  const options = this.runner.options;
1195
1201
  const { runPrefix, testType, description } = options;
@@ -1298,13 +1304,10 @@ var TestCaseFhirBase = class {
1298
1304
  210
1299
1305
  ]
1300
1306
  ];
1301
- if (this._indexTable[workerManagerId] === void 0) this._indexTable[workerManagerId] = this._currentWorkerManagerIndex++;
1302
- const workerManagerIndex = this._indexTable[workerManagerId];
1303
1307
  const rgbTableRow = rgbTable[options.workerIndex % rgbTable.length];
1304
- const workerManagerRGBTableRow = workerManagerRGBTable[workerManagerIndex % workerManagerRGBTable.length];
1308
+ const workerManagerRGBTableRow = workerManagerRGBTable[this.hashString(workerManagerId) % workerManagerRGBTable.length];
1305
1309
  const wkCol = chalk.default.rgb(rgbTableRow[0], rgbTableRow[1], rgbTableRow[2]);
1306
1310
  const wkColWM = chalk.default.rgb(workerManagerRGBTableRow[0], workerManagerRGBTableRow[1], workerManagerRGBTableRow[2]);
1307
- console.log(`${workerManagerId} = ${workerManagerIndex} ${JSON.stringify(this._indexTable)}`);
1308
1311
  return wkCol(`runPrefix: [${chalk.default.bold(runPrefix)}], testType: [${chalk.default.bold(testType)}], description: [${chalk.default.bold(description)}], workerManagerId: [${wkColWM(chalk.default.bold(workerManagerId))}], Iteration: [${chalk.default.bold(iteration.toString())}]`);
1309
1312
  };
1310
1313
  _CheckOutputLongDurationError = (snapshotStart, message) => {