@nsshunt/ststestrunner 1.1.54 → 1.1.56

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.
@@ -423,13 +423,27 @@ var TestCaseFhirBase = class {
423
423
  StopRunner = async () => {
424
424
  await this.#OutputLogMessage(`StopRunner [${this.#runner.id}]`);
425
425
  await this.#ForcePublishTelemetryData();
426
- this.Debug(`TestCaseFhirBase:StopRunner(): Calling: [#fhirClient.Terminate()]`);
426
+ if (this.fhirClient) {
427
+ console.log(chalk.red(`************************************************************************************************`));
428
+ this.Debug(chalk.magenta(`TestCaseFhirBase:StopRunner(): Calling: [fhirClient.ResetSocket()]`));
429
+ console.log(chalk.red(`************************************************************************************************`));
430
+ this.fhirClient.ResetSocket();
431
+ await Sleep(100);
432
+ this.fhirClient = null;
433
+ }
427
434
  return true;
428
435
  };
429
436
  TerminateRunner = async () => {
430
437
  await this.#OutputLogMessage(`TerminateRunner [${this.#runner.id}]`);
431
438
  await this.#ForcePublishTelemetryData();
432
- this.Debug(`TestCaseFhirBase:TerminateRunner(): Calling: [#fhirClient.Terminate()]`);
439
+ if (this.fhirClient) {
440
+ console.log(chalk.red(`************************************************************************************************`));
441
+ this.Debug(chalk.magenta(`TestCaseFhirBase:TerminateRunner(): Calling: [fhirClient.ResetSocket()]`));
442
+ console.log(chalk.red(`************************************************************************************************`));
443
+ this.fhirClient.ResetSocket();
444
+ await Sleep(100);
445
+ this.fhirClient = null;
446
+ }
433
447
  return true;
434
448
  };
435
449
  Completed = async () => {
@@ -437,7 +451,14 @@ var TestCaseFhirBase = class {
437
451
  this.runner.instrumentData.timer = performance.now() - start;
438
452
  await this.#OutputLogMessage(`Completed [${this.#runner.id}] [${JSON.stringify(this.#runner.instrumentData)}]`);
439
453
  await this.#ForcePublishTelemetryData();
440
- this.Debug(`TestCaseFhirBase:Completed(): Calling: [#fhirClient.Terminate()]`);
454
+ if (this.fhirClient) {
455
+ console.log(chalk.red(`************************************************************************************************`));
456
+ this.Debug(chalk.magenta(`TestCaseFhirBase:Completed(): Calling: [fhirClient.ResetSocket()]`));
457
+ console.log(chalk.red(`************************************************************************************************`));
458
+ this.fhirClient.ResetSocket();
459
+ await Sleep(100);
460
+ this.fhirClient = null;
461
+ }
441
462
  return true;
442
463
  };
443
464
  PauseRunner = async () => {
@@ -453,6 +474,14 @@ var TestCaseFhirBase = class {
453
474
  ResetRunner = async () => {
454
475
  await this.#OutputLogMessage(`ResetRunner [${this.#runner.id}]`);
455
476
  await this.#ForcePublishTelemetryData();
477
+ if (this.fhirClient) {
478
+ console.log(chalk.red(`************************************************************************************************`));
479
+ this.Debug(chalk.magenta(`TestCaseFhirBase:ResetRunner(): Calling: [fhirClient.ResetSocket()]`));
480
+ console.log(chalk.red(`************************************************************************************************`));
481
+ this.fhirClient.ResetSocket();
482
+ await Sleep(100);
483
+ this.fhirClient = null;
484
+ }
456
485
  return true;
457
486
  };
458
487
  UpdateRunner = async () => {