@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.
package/dist/ststestrunner.mjs
CHANGED
|
@@ -979,8 +979,6 @@ var TestCaseFhirBase = class {
|
|
|
979
979
|
#publishTelemetryTimeout = null;
|
|
980
980
|
#publishTelemetryTimeoutVal = 1e3;
|
|
981
981
|
randomSequence = [];
|
|
982
|
-
_currentWorkerManagerIndex = 0;
|
|
983
|
-
_indexTable = {};
|
|
984
982
|
_RetryMap = [
|
|
985
983
|
100,
|
|
986
984
|
250,
|
|
@@ -1185,6 +1183,14 @@ var TestCaseFhirBase = class {
|
|
|
1185
1183
|
await this.#ForcePublishTelemetryData();
|
|
1186
1184
|
return true;
|
|
1187
1185
|
};
|
|
1186
|
+
hashString(str) {
|
|
1187
|
+
let hash = 2166136261;
|
|
1188
|
+
for (let i = 0; i < str.length; i++) {
|
|
1189
|
+
hash ^= str.charCodeAt(i);
|
|
1190
|
+
hash = Math.imul(hash, 16777619);
|
|
1191
|
+
}
|
|
1192
|
+
return hash >>> 0;
|
|
1193
|
+
}
|
|
1188
1194
|
_GetDetail = () => {
|
|
1189
1195
|
const options = this.runner.options;
|
|
1190
1196
|
const { runPrefix, testType, description } = options;
|
|
@@ -1293,13 +1299,10 @@ var TestCaseFhirBase = class {
|
|
|
1293
1299
|
210
|
|
1294
1300
|
]
|
|
1295
1301
|
];
|
|
1296
|
-
if (this._indexTable[workerManagerId] === void 0) this._indexTable[workerManagerId] = this._currentWorkerManagerIndex++;
|
|
1297
|
-
const workerManagerIndex = this._indexTable[workerManagerId];
|
|
1298
1302
|
const rgbTableRow = rgbTable[options.workerIndex % rgbTable.length];
|
|
1299
|
-
const workerManagerRGBTableRow = workerManagerRGBTable[
|
|
1303
|
+
const workerManagerRGBTableRow = workerManagerRGBTable[this.hashString(workerManagerId) % workerManagerRGBTable.length];
|
|
1300
1304
|
const wkCol = chalk.rgb(rgbTableRow[0], rgbTableRow[1], rgbTableRow[2]);
|
|
1301
1305
|
const wkColWM = chalk.rgb(workerManagerRGBTableRow[0], workerManagerRGBTableRow[1], workerManagerRGBTableRow[2]);
|
|
1302
|
-
console.log(`${workerManagerId} = ${workerManagerIndex} ${JSON.stringify(this._indexTable)}`);
|
|
1303
1306
|
return wkCol(`runPrefix: [${chalk.bold(runPrefix)}], testType: [${chalk.bold(testType)}], description: [${chalk.bold(description)}], workerManagerId: [${wkColWM(chalk.bold(workerManagerId))}], Iteration: [${chalk.bold(iteration.toString())}]`);
|
|
1304
1307
|
};
|
|
1305
1308
|
_CheckOutputLongDurationError = (snapshotStart, message) => {
|