@nsshunt/ststestrunner 1.0.27 → 1.0.29

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.
@@ -11962,17 +11962,12 @@ class FhirSocketClient {
11962
11962
  }
11963
11963
  });
11964
11964
  __publicField2(this, "WaitForSocketConnected", async () => {
11965
- console.log(chalk.gray(`WaitForSocketConnected(): Waiting for socket connection [Start]`));
11966
- console.log(chalk.gray(`WaitForSocketConnected(): Attempting to get socket`));
11967
11965
  const socket = __privateGet$1(this, _socketUtils).GetSocket(__privateGet$1(this, _options2).socketClientName);
11968
- if (socket) {
11969
- console.log(chalk.gray(`WaitForSocketConnected(): Socket obtained`));
11970
- } else {
11971
- console.log(chalk.gray(`WaitForSocketConnected(): No socket obtained yet ...`));
11966
+ if (socket && socket.connected === true) {
11967
+ return;
11972
11968
  }
11973
11969
  let connected = false;
11974
11970
  while (!connected) {
11975
- console.log(chalk.gray(`WaitForSocketConnected(): Waiting for socket connection ...`));
11976
11971
  const socketRetVal = __privateGet$1(this, _socketUtils).GetSocket(__privateGet$1(this, _options2).socketClientName);
11977
11972
  if (socketRetVal && socketRetVal.connected === true) {
11978
11973
  connected = true;
@@ -11980,7 +11975,6 @@ class FhirSocketClient {
11980
11975
  }
11981
11976
  await Sleep(100);
11982
11977
  }
11983
- console.log(chalk.gray(`WaitForSocketConnected(): Waiting for socket connection [End]`));
11984
11978
  });
11985
11979
  __publicField2(this, "CreateResource", async (resource, domainResource) => {
11986
11980
  await this.WaitForSocketConnected();
@@ -12837,16 +12831,19 @@ class TestCaseFhirBase {
12837
12831
  __publicField(this, "StopRunner", async () => {
12838
12832
  await __privateGet(this, _OutputLogMessage2).call(this, `StopRunner [${__privateGet(this, _runner2).id}]`);
12839
12833
  await __privateGet(this, _ForcePublishTelemetryData2).call(this);
12834
+ __privateGet(this, _fhirClient).Terminate();
12840
12835
  return true;
12841
12836
  });
12842
12837
  __publicField(this, "TerminateRunner", async () => {
12843
12838
  await __privateGet(this, _OutputLogMessage2).call(this, `TerminateRunner [${__privateGet(this, _runner2).id}]`);
12844
12839
  await __privateGet(this, _ForcePublishTelemetryData2).call(this);
12840
+ __privateGet(this, _fhirClient).Terminate();
12845
12841
  return true;
12846
12842
  });
12847
12843
  __publicField(this, "Completed", async () => {
12848
12844
  await __privateGet(this, _OutputLogMessage2).call(this, `Completed [${__privateGet(this, _runner2).id}] [${JSON.stringify(__privateGet(this, _runner2).instrumentData)}]`);
12849
12845
  await __privateGet(this, _ForcePublishTelemetryData2).call(this);
12846
+ __privateGet(this, _fhirClient).Terminate();
12850
12847
  return true;
12851
12848
  });
12852
12849
  __publicField(this, "PauseRunner", async () => {
@@ -13220,15 +13217,12 @@ class TestCaseFhir02 extends TestCaseFhirBase {
13220
13217
  this.runner.instrumentData.message.push(chalk$1.green(`Iteration: [${iteration} #authUtilsNode(): Agent Reset`));
13221
13218
  }
13222
13219
  const personRecord = this.GetPersonRecord(`${options.personPrefix}`, iteration);
13223
- console.log(chalk$1.yellow(JSON.stringify(personRecord, null, 2)));
13224
13220
  try {
13225
13221
  const retVal = await this.fhirClient.CreateResource("Person", personRecord, (error) => {
13226
13222
  this.LogErrorMessage(`test(POST /stsresource and query using filter): ${error}`);
13227
13223
  this.runner.instrumentData.errorCount++;
13228
13224
  });
13229
- console.log(chalk$1.rgb(200, 100, 50)(JSON.stringify(retVal, null, 2)));
13230
13225
  } catch (error) {
13231
- console.log(chalk$1.rgb(200, 100, 50)(error));
13232
13226
  this.runner.instrumentData.errorCount++;
13233
13227
  }
13234
13228
  this.runner.instrumentData.coreCount = 1;
@@ -13419,6 +13413,9 @@ class TestCaseFhir06 extends TestCaseFhirQueryBase {
13419
13413
  constructor() {
13420
13414
  super(...arguments);
13421
13415
  __publicField(this, "ExecuteQuery", async (iteration, fhirClient) => {
13416
+ if (this.runner.iteration % 100 === 0) {
13417
+ this.Debug(`-->> Iteration: ${this.runner.iteration}`);
13418
+ }
13422
13419
  const searchLetter = String.fromCharCode(65 + iteration % 26);
13423
13420
  const retVal = await fhirClient.GetResources("Person", [], {
13424
13421
  given: searchLetter,
@@ -13435,6 +13432,9 @@ class TestCaseFhir07 extends TestCaseFhirQueryBase {
13435
13432
  constructor() {
13436
13433
  super(...arguments);
13437
13434
  __publicField(this, "ExecuteQuery", async (iteration, fhirClient) => {
13435
+ if (this.runner.iteration % 100 === 0) {
13436
+ this.Debug(`-->> Iteration: ${this.runner.iteration}`);
13437
+ }
13438
13438
  const searchLetter = String.fromCharCode(65 + iteration % 26);
13439
13439
  const retVal = await fhirClient.GetResources("Person", [], {
13440
13440
  given: searchLetter
@@ -13450,6 +13450,9 @@ class TestCaseFhir08 extends TestCaseFhirQueryBase {
13450
13450
  constructor() {
13451
13451
  super(...arguments);
13452
13452
  __publicField(this, "ExecuteQuery", async (iteration, fhirClient) => {
13453
+ if (this.runner.iteration % 100 === 0) {
13454
+ this.Debug(`-->> Iteration: ${this.runner.iteration}`);
13455
+ }
13453
13456
  const searchLetter = String.fromCharCode(65 + iteration % 26);
13454
13457
  const retVal = await fhirClient.GetResources("Person", [], {
13455
13458
  family: searchLetter