@nsshunt/ststestrunner 1.1.58 → 1.1.60

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.
@@ -132,7 +132,10 @@ var TestCaseFhirBase = class {
132
132
  GetFhirSocketClient = async () => {
133
133
  try {
134
134
  this.#clientSocketFetchCount++;
135
- if (this.fhirClient) return this.fhirClient;
135
+ if (this.runnerExecutionWorker.fhirClient) {
136
+ this.fhirClient = this.runnerExecutionWorker.fhirClient;
137
+ return this.fhirClient;
138
+ }
136
139
  const fhirOptions = this.#options.fhirOptions;
137
140
  const options = {
138
141
  fhirServerEndpoint: fhirOptions.stsfhirserverendpoint,
@@ -152,6 +155,7 @@ var TestCaseFhirBase = class {
152
155
  if (this.runner.options.fhirOptions.stsfhirsocketclientmode === "socket-client-all-in-one") this.fhirClient = new FhirSocketClientAllInOne("FhirSocketClient", options);
153
156
  else this.fhirClient = new FhirSocketClientIndividual("FhirSocketClient", options);
154
157
  await this.fhirClient.WaitForSocketConnected();
158
+ this.runnerExecutionWorker.fhirClient = this.fhirClient;
155
159
  return this.fhirClient;
156
160
  } catch (error) {
157
161
  this.LogErrorMessage(error);
@@ -426,7 +430,9 @@ var TestCaseFhirBase = class {
426
430
  await this.#ForcePublishTelemetryData();
427
431
  if (this.fhirClient) {
428
432
  this.Debug(chalk.magenta(`TestCaseFhirBase:StopRunner(): Calling: [fhirClient.ResetSocket()]`));
433
+ this.fhirClient.ResetSocket();
429
434
  await Sleep(100);
435
+ this.fhirClient = null;
430
436
  }
431
437
  return true;
432
438
  };
@@ -435,7 +441,9 @@ var TestCaseFhirBase = class {
435
441
  await this.#ForcePublishTelemetryData();
436
442
  if (this.fhirClient) {
437
443
  this.Debug(chalk.magenta(`TestCaseFhirBase:TerminateRunner(): Calling: [fhirClient.ResetSocket()]`));
444
+ this.fhirClient.ResetSocket();
438
445
  await Sleep(100);
446
+ this.fhirClient = null;
439
447
  }
440
448
  return true;
441
449
  };
@@ -446,7 +454,9 @@ var TestCaseFhirBase = class {
446
454
  await this.#ForcePublishTelemetryData();
447
455
  if (this.fhirClient) {
448
456
  this.Debug(chalk.magenta(`TestCaseFhirBase:Completed(): Calling: [fhirClient.ResetSocket()]`));
457
+ this.fhirClient.ResetSocket();
449
458
  await Sleep(100);
459
+ this.fhirClient = null;
450
460
  }
451
461
  return true;
452
462
  };
@@ -465,7 +475,9 @@ var TestCaseFhirBase = class {
465
475
  await this.#ForcePublishTelemetryData();
466
476
  if (this.fhirClient) {
467
477
  this.Debug(chalk.magenta(`TestCaseFhirBase:ResetRunner(): Calling: [fhirClient.ResetSocket()]`));
478
+ this.fhirClient.ResetSocket();
468
479
  await Sleep(100);
480
+ this.fhirClient = null;
469
481
  }
470
482
  return true;
471
483
  };
@@ -35801,6 +35813,7 @@ var WorkerFhirTestCases = class extends AbstractRunnerExecutionWorker {
35801
35813
  this._options = options;
35802
35814
  this._resourceDataGenerator = new ResourceDataGenerator();
35803
35815
  }
35816
+ fhirClient = void 0;
35804
35817
  get resourceDataGenerator() {
35805
35818
  return this._resourceDataGenerator;
35806
35819
  }