@nsshunt/ststestrunner 1.1.158 → 1.1.160
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.cjs +24 -5
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +24 -5
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +1 -1
- package/types/libmodule/testCaseFhir02.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir03.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir04.d.ts.map +1 -1
- package/types/libmodule/testCaseFhirBase.d.ts +2 -0
- package/types/libmodule/testCaseFhirBase.d.ts.map +1 -1
- package/types/libmodule/workerFhirTestCases.d.ts +3 -0
- package/types/libmodule/workerFhirTestCases.d.ts.map +1 -1
package/dist/ststestrunner.mjs
CHANGED
|
@@ -999,14 +999,22 @@ var TestCaseFhirBase = class {
|
|
|
999
999
|
get runnerExecutionWorker() {
|
|
1000
1000
|
return this.#runnerExecutionWorker;
|
|
1001
1001
|
}
|
|
1002
|
+
GetMaxIteration(key) {
|
|
1003
|
+
return this.runnerExecutionWorker.GetMaxIteration(key);
|
|
1004
|
+
}
|
|
1005
|
+
SetMaxIteration(key, maxIteration) {
|
|
1006
|
+
this.runnerExecutionWorker.SetMaxIteration(key, maxIteration);
|
|
1007
|
+
}
|
|
1002
1008
|
ResetClient = () => {};
|
|
1003
1009
|
GetRandomSequenceFromIteration = () => {
|
|
1010
|
+
const prefix = this.runner.options.personPrefix;
|
|
1011
|
+
const maxIterations = this.GetMaxIteration(prefix);
|
|
1004
1012
|
if (this.runner.iteration === 0) {
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1007
|
-
this.randomSequence = getRandomIterationOrder(this.runner.options.executionProfile.iterations, seedId);
|
|
1013
|
+
const seedId = prefix;
|
|
1014
|
+
this.randomSequence = getRandomIterationOrder(maxIterations, seedId);
|
|
1008
1015
|
}
|
|
1009
|
-
|
|
1016
|
+
const useIteration = this.runner.iteration % maxIterations;
|
|
1017
|
+
return this.randomSequence[useIteration];
|
|
1010
1018
|
};
|
|
1011
1019
|
Error = (message) => {
|
|
1012
1020
|
this.#runnerExecutionWorker.logger.error(message);
|
|
@@ -1466,6 +1474,7 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
|
1466
1474
|
"entry": []
|
|
1467
1475
|
};
|
|
1468
1476
|
const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
|
|
1477
|
+
this.SetMaxIteration(prefix, this.runner.iteration);
|
|
1469
1478
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1470
1479
|
const foundIndexPersonRecords = this.personRecords.findIndex((p) => p.id?.localeCompare(personRecord.id) === 0);
|
|
1471
1480
|
const foundIndexBindlePersonRecords = this.bundleBatch.entry.findIndex((p) => p.resource.id?.localeCompare(personRecord.id) === 0);
|
|
@@ -1511,7 +1520,8 @@ var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
|
|
|
1511
1520
|
const __snapshot1 = performance.now();
|
|
1512
1521
|
const client = await this.GetClient();
|
|
1513
1522
|
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1514
|
-
const
|
|
1523
|
+
const prefix = this.runner.options.personPrefix;
|
|
1524
|
+
const personRecord = await this.GetPersonRecord(prefix, this.GetRandomSequenceFromIteration(), "1");
|
|
1515
1525
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1516
1526
|
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1517
1527
|
this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
@@ -1537,6 +1547,8 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1537
1547
|
this.runner.instrumentData.requestCount++;
|
|
1538
1548
|
const compPersonRecord = { ...personRecord };
|
|
1539
1549
|
const loadedPersonRecorded = { ...retVal.body };
|
|
1550
|
+
console.log(` ==> version id: [${loadedPersonRecorded.meta.versionId}]`);
|
|
1551
|
+
console.log(` ==> tag: [${loadedPersonRecorded.meta.tag}]`);
|
|
1540
1552
|
delete compPersonRecord.meta;
|
|
1541
1553
|
delete loadedPersonRecorded.meta;
|
|
1542
1554
|
this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
|
|
@@ -16850,6 +16862,7 @@ var WorkerFhirTestCases = class extends AbstractRunnerExecutionWorker {
|
|
|
16850
16862
|
_id = crypto.randomUUID();
|
|
16851
16863
|
_clientHelper;
|
|
16852
16864
|
_authHelper;
|
|
16865
|
+
_maxIteration = {};
|
|
16853
16866
|
restFhirClient = null;
|
|
16854
16867
|
logPrefix = `WorkerFhirTestCases:[${this._id}]:`;
|
|
16855
16868
|
constructor(options) {
|
|
@@ -16964,6 +16977,12 @@ var WorkerFhirTestCases = class extends AbstractRunnerExecutionWorker {
|
|
|
16964
16977
|
GetClient = async () => {
|
|
16965
16978
|
return this._clientHelper.GetClient();
|
|
16966
16979
|
};
|
|
16980
|
+
GetMaxIteration(key) {
|
|
16981
|
+
return this._maxIteration[key];
|
|
16982
|
+
}
|
|
16983
|
+
SetMaxIteration(key, maxIteration) {
|
|
16984
|
+
this._maxIteration[key] = maxIteration;
|
|
16985
|
+
}
|
|
16967
16986
|
};
|
|
16968
16987
|
//#endregion
|
|
16969
16988
|
export { WorkerFhirTestCases };
|