@nsshunt/ststestrunner 1.0.43 → 1.0.45
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
|
@@ -11974,11 +11974,18 @@ class FhirSocketClient {
|
|
|
11974
11974
|
if (socket && socket.connected === true) {
|
|
11975
11975
|
return;
|
|
11976
11976
|
}
|
|
11977
|
+
console.log(chalk.yellow(`FhirSocketClient:#WaitForSocketConnected(): ID: [${__privateGet$1(this, _id)}] clientName: [${__privateGet$1(this, _clientName)}] Waiting for connection ...`));
|
|
11977
11978
|
let connected = false;
|
|
11979
|
+
let attempts = 0;
|
|
11978
11980
|
while (!connected) {
|
|
11981
|
+
attempts++;
|
|
11982
|
+
if (attempts % 10 === 0) {
|
|
11983
|
+
console.log(chalk.yellow(`FhirSocketClient:#WaitForSocketConnected(): ID: [${__privateGet$1(this, _id)}] clientName: [${__privateGet$1(this, _clientName)}] waiting for connection attempts: [${attempts}].`));
|
|
11984
|
+
}
|
|
11979
11985
|
const socketRetVal = __privateGet$1(this, _socketUtils).GetSocket(__privateGet$1(this, _options2).socketClientName);
|
|
11980
11986
|
if (socketRetVal && socketRetVal.connected === true) {
|
|
11981
11987
|
connected = true;
|
|
11988
|
+
console.log(chalk.yellow(`FhirSocketClient:#WaitForSocketConnected(): ID: [${__privateGet$1(this, _id)}] clientName: [${__privateGet$1(this, _clientName)}] Connection completed after: [${attempts}] attempts.`));
|
|
11982
11989
|
break;
|
|
11983
11990
|
}
|
|
11984
11991
|
await Sleep(100);
|
|
@@ -12070,11 +12077,16 @@ class FhirSocketClient {
|
|
|
12070
12077
|
body: {}
|
|
12071
12078
|
};
|
|
12072
12079
|
return new Promise((resolve, reject) => {
|
|
12080
|
+
const start = performance.now();
|
|
12073
12081
|
this.socket.timeout(__privateGet$1(this, _options2).timeout).emit("getFhirResources", resource, request, (err, res) => {
|
|
12074
12082
|
if (err) {
|
|
12083
|
+
const duration = (performance.now() - start) / 1e3;
|
|
12084
|
+
console.log(`FhirSocketClient:GetResources(): Duration for query (error): [${duration}]`);
|
|
12075
12085
|
__privateGet$1(this, _error).call(this, `FhirSocketClient:GetResources(): ID: [${__privateGet$1(this, _id)}] clientName: [${__privateGet$1(this, _clientName)}] Error: [${err}]`);
|
|
12076
12086
|
reject(err);
|
|
12077
12087
|
} else {
|
|
12088
|
+
const duration = (performance.now() - start) / 1e3;
|
|
12089
|
+
console.log(`FhirSocketClient:GetResources(): Duration for query: [${duration}]`);
|
|
12078
12090
|
resolve(res);
|
|
12079
12091
|
}
|
|
12080
12092
|
});
|
|
@@ -12917,6 +12929,7 @@ class TestCaseFhirBase {
|
|
|
12917
12929
|
// `https://stscore.stsmda.org:3005/nsstsfhir/`,
|
|
12918
12930
|
socketIoCustomPath: "/stsfhirsocket/socket.io/",
|
|
12919
12931
|
socketClientName: "ststestrunner",
|
|
12932
|
+
//@@@ must be unique ????
|
|
12920
12933
|
timeout: 1e4,
|
|
12921
12934
|
//@@ config option as with all options above
|
|
12922
12935
|
socketIoClientHelperOptions: {
|
|
@@ -13548,7 +13561,7 @@ class StartUpDelFhirResources extends TestCaseFhirBase {
|
|
|
13548
13561
|
limit: options.batchDeleteSize,
|
|
13549
13562
|
prefix: options.personPrefix
|
|
13550
13563
|
}, (error) => {
|
|
13551
|
-
this.LogErrorMessage(chalk$1.red(`
|
|
13564
|
+
this.LogErrorMessage(chalk$1.red(`ExecuteRunner():GetResources: Error: [${error}]`));
|
|
13552
13565
|
});
|
|
13553
13566
|
__privateGet(this, _debug3).call(this, chalk$1.magenta(`ExecuteRunner() - post GetResources()`));
|
|
13554
13567
|
__privateGet(this, _debug3).call(this, retVal);
|