@nsshunt/ststestrunner 1.1.46 → 1.1.47
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
CHANGED
|
@@ -52,6 +52,8 @@ var TestCaseFhirBase = class {
|
|
|
52
52
|
#publishTelemetryTimeout = null;
|
|
53
53
|
#publishTelemetryTimeoutVal = 1e3;
|
|
54
54
|
#originRegex = /^(api:\/\/\w+)/;
|
|
55
|
+
#resetSocketClientTrigger = 100;
|
|
56
|
+
#clientSocketFetchCount = 0;
|
|
55
57
|
#authAgentManager;
|
|
56
58
|
accessTokenTime = performance.now();
|
|
57
59
|
newTokenLimitTime = 30;
|
|
@@ -153,7 +155,15 @@ var TestCaseFhirBase = class {
|
|
|
153
155
|
};
|
|
154
156
|
GetFhirSocketClient = async () => {
|
|
155
157
|
try {
|
|
156
|
-
|
|
158
|
+
this.#clientSocketFetchCount++;
|
|
159
|
+
if (this.fhirClient) {
|
|
160
|
+
if (this.#clientSocketFetchCount % this.#resetSocketClientTrigger === 0) {
|
|
161
|
+
this.fhirClient.ResetSocket();
|
|
162
|
+
await (0, _nsshunt_stsutils.Sleep)(250);
|
|
163
|
+
this.fhirClient = null;
|
|
164
|
+
return this.GetFhirSocketClient();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
157
167
|
const fhirOptions = this.#options.fhirOptions;
|
|
158
168
|
const options = {
|
|
159
169
|
fhirServerEndpoint: fhirOptions.stsfhirserverendpoint,
|
|
@@ -166,7 +176,7 @@ var TestCaseFhirBase = class {
|
|
|
166
176
|
agentManager: this.GetFhirAgentManager(),
|
|
167
177
|
joinRooms: [],
|
|
168
178
|
logger: this.#runnerExecutionWorker.logger,
|
|
169
|
-
|
|
179
|
+
GetConnectionAccessToken: this.GetAccessTokenForSocketClientAccess,
|
|
170
180
|
GetAccessToken: this.GetAccessToken
|
|
171
181
|
};
|
|
172
182
|
if (this.runner.options.fhirOptions.stsfhirsocketclientmode === "socket-client-all-in-one") this.fhirClient = new _nsshunt_stsfhirclient.FhirSocketClientAllInOne("FhirSocketClient", options);
|