@nsshunt/ststestrunner 1.1.86 → 1.1.88

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.
@@ -415,6 +415,8 @@ var TestCaseFhirBase = class {
415
415
  #resetSocketClientTrigger = 50;
416
416
  #clientSocketFetchCount = 0;
417
417
  #authAgentManager;
418
+ retryCount = 0;
419
+ maxAuthRetryCount = 5;
418
420
  runnerDurationList = [];
419
421
  _authMaxTimeout = 5e3;
420
422
  accessTokenTime = performance.now();
@@ -924,32 +926,12 @@ var TestCaseFhirBase = class {
924
926
  await this.#ForcePublishTelemetryData();
925
927
  return true;
926
928
  };
927
- };
928
- //#endregion
929
- //#region src/libmodule/testCaseFhirQueryBase.ts
930
- var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
931
- _longExecTimeoutVal = 5e3;
932
- _durationList = [];
933
- constructor(workerInstance, runner) {
934
- super(workerInstance, runner);
935
- }
936
929
  GetClient = async () => {
937
930
  let client;
938
931
  if (this.runner.options.fhirOptions.stsfhirsocketclientmode === "no-socket-client") client = await this.GetRESTClient();
939
932
  else client = await this.GetFhirSocketClient();
940
933
  return client;
941
934
  };
942
- ExecuteQuery = async () => {
943
- return null;
944
- };
945
- #ResetClient = (reason) => {
946
- this.ResetClient();
947
- };
948
- #CheckResetClient = () => {
949
- if (this.runner.instrumentData.requestCount > 0) {
950
- if (this.runner.instrumentData.requestCount % this.runner.options.clientResetMod === 0) this.#ResetClient("#ResetClient triggered");
951
- }
952
- };
953
935
  _GetDetail = () => {
954
936
  return `testType: [${this.runner.options.testType}], description: [${this.runner.options.description}], workerManagerId: [${this.runner.workerManagerId}], Iteration: [${this.runner.iteration}]`;
955
937
  };
@@ -962,6 +944,48 @@ var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
962
944
  }
963
945
  return snapShotEnd;
964
946
  };
947
+ ExecuteQuery = async () => {
948
+ this.retryCount = 0;
949
+ return this._ExecuteQuery();
950
+ };
951
+ _ExecuteQuery = async () => {
952
+ try {
953
+ return await this.PerformExecuteQuery();
954
+ } catch (error) {
955
+ this.runner.instrumentData.errorCount++;
956
+ if (this.HandleError(error) === true) if (this.retryCount < this.maxAuthRetryCount) {
957
+ this.retryCount++;
958
+ this.runner.instrumentData.authenticationRetryCount++;
959
+ const message = `TestCaseFhir02:ExecuteQuery(): Retry auth attempt: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}]`;
960
+ this.Error(message);
961
+ await (0, _nsshunt_stsutils.Sleep)(this.retryCount * 1e3);
962
+ return await this._ExecuteQuery();
963
+ } else {
964
+ const message = `TestCaseFhir02:ExecuteQuery(): Max auth retries exceeded: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}], Error: [${error}]`;
965
+ this.Error(message);
966
+ error.message = message;
967
+ throw error;
968
+ }
969
+ else throw error;
970
+ }
971
+ };
972
+ };
973
+ //#endregion
974
+ //#region src/libmodule/testCaseFhirQueryBase.ts
975
+ var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
976
+ _longExecTimeoutVal = 5e3;
977
+ _durationList = [];
978
+ constructor(workerInstance, runner) {
979
+ super(workerInstance, runner);
980
+ }
981
+ #ResetClient = (reason) => {
982
+ this.ResetClient();
983
+ };
984
+ #CheckResetClient = () => {
985
+ if (this.runner.instrumentData.requestCount > 0) {
986
+ if (this.runner.instrumentData.requestCount % this.runner.options.clientResetMod === 0) this.#ResetClient("#ResetClient triggered");
987
+ }
988
+ };
965
989
  ExecuteRunner = async () => {
966
990
  if (this.runner.iteration % 100 === 0) this.Debug(`TestCaseFhirQueryBase:ExecuteRunner(): ${this._GetDetail()}`);
967
991
  const start = performance.now();
@@ -1024,197 +1048,139 @@ var TestCaseFhirQueryBase = class extends TestCaseFhirBase {
1024
1048
  //#endregion
1025
1049
  //#region src/libmodule/testCaseFhir01.ts
1026
1050
  var TestCaseFhir01 = class extends TestCaseFhirQueryBase {
1027
- ExecuteQuery = async () => {
1028
- try {
1029
- const __snapshot1 = performance.now();
1030
- await this.GetAccessToken();
1031
- this._CheckOutputLongDurationError(__snapshot1, "await this.GetAccessToken()");
1032
- this.accesssToken = null;
1033
- return null;
1034
- } catch (error) {
1035
- this.runner.instrumentData.errorCount++;
1036
- this.Error(`TestCaseFhir01:ExecuteQuery(): Error: [${error}]`);
1037
- throw error;
1038
- }
1051
+ PerformExecuteQuery = async () => {
1052
+ const __snapshot1 = performance.now();
1053
+ await this.GetAccessToken();
1054
+ this._CheckOutputLongDurationError(__snapshot1, "await this.GetAccessToken()");
1055
+ this.accesssToken = null;
1056
+ return null;
1039
1057
  };
1040
1058
  };
1041
1059
  //#endregion
1042
1060
  //#region src/libmodule/testCaseFhir02.ts
1043
1061
  var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
1044
- retryCount = 0;
1045
- maxAuthRetryCount = 5;
1046
- ExecuteQuery = async () => {
1047
- this.retryCount = 0;
1048
- if (this.runner.iteration > 0) for (let i = 0; i < 15; i++) {
1049
- await (0, _nsshunt_stsutils.Sleep)(1e3);
1050
- console.log(chalk.default.rgb(100, 50, 100)(`Sleep count: [${i}]`));
1051
- }
1052
- return this._ExecuteQuery();
1053
- };
1054
- _ExecuteQuery = async () => {
1055
- try {
1056
- const __snapshot1 = performance.now();
1057
- const client = await this.GetClient();
1058
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1059
- const prefix = this.runner.options.personPrefix;
1060
- const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
1061
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1062
- const retVal = await client.PostResource("Person", personRecord);
1063
- this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
1064
- return retVal.body;
1065
- } catch (error) {
1066
- this.runner.instrumentData.errorCount++;
1067
- if (this.HandleError(error) === true) if (this.retryCount < this.maxAuthRetryCount) {
1068
- this.retryCount++;
1069
- this.runner.instrumentData.authenticationRetryCount++;
1070
- const message = `TestCaseFhir02:ExecuteQuery(): Retry auth attempt: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}]`;
1071
- this.Error(message);
1072
- await (0, _nsshunt_stsutils.Sleep)(this.retryCount * 1e3);
1073
- return this._ExecuteQuery();
1074
- } else {
1075
- const message = `TestCaseFhir02:ExecuteQuery(): Max auth retries exceeded: retryCount: [${this.retryCount}], maxAuthRetryCount: [${this.maxAuthRetryCount}], Error: [${error}]`;
1076
- this.Error(message);
1077
- error.message = message;
1078
- throw error;
1079
- }
1080
- else throw error;
1081
- }
1062
+ PerformExecuteQuery = async () => {
1063
+ const __snapshot1 = performance.now();
1064
+ const client = await this.GetClient();
1065
+ const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1066
+ const prefix = this.runner.options.personPrefix;
1067
+ const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
1068
+ const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1069
+ const retVal = await client.PostResource("Person", personRecord);
1070
+ this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
1071
+ return retVal.body;
1082
1072
  };
1083
1073
  };
1084
1074
  //#endregion
1085
1075
  //#region src/libmodule/testCaseFhir03.ts
1086
1076
  var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
1087
- ExecuteQuery = async () => {
1088
- try {
1089
- const __snapshot1 = performance.now();
1090
- const client = await this.GetClient();
1091
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1092
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
1093
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1094
- const retVal = await client.GetResource("Person", personRecord.id);
1095
- this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1096
- delete personRecord.meta;
1097
- delete retVal.body.meta;
1098
- const p1 = JSON.stringify(personRecord);
1099
- const p2 = JSON.stringify(retVal.body);
1100
- if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
1101
- return retVal.body;
1102
- } catch (error) {
1103
- this.runner.instrumentData.errorCount++;
1104
- this.Error(`TestCaseFhir03:ExecuteQuery(): Error: [${error}]`);
1105
- throw error;
1106
- }
1077
+ PerformExecuteQuery = async () => {
1078
+ const __snapshot1 = performance.now();
1079
+ const client = await this.GetClient();
1080
+ const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1081
+ const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
1082
+ const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1083
+ const retVal = await client.GetResource("Person", personRecord.id);
1084
+ this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1085
+ delete personRecord.meta;
1086
+ delete retVal.body.meta;
1087
+ const p1 = JSON.stringify(personRecord);
1088
+ const p2 = JSON.stringify(retVal.body);
1089
+ if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
1090
+ return retVal.body;
1107
1091
  };
1108
1092
  };
1109
1093
  //#endregion
1110
1094
  //#region src/libmodule/testCaseFhir04.ts
1111
1095
  var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1112
- ExecuteQuery = async () => {
1113
- try {
1114
- const __snapshot1 = performance.now();
1115
- const client = await this.GetClient();
1116
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1117
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
1118
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1119
- const retVal = await client.GetResource("Person", personRecord.id);
1120
- const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1121
- this.runner.instrumentData.requestCount++;
1122
- const compPersonRecord = { ...personRecord };
1123
- const loadedPersonRecorded = { ...retVal.body };
1124
- delete compPersonRecord.meta;
1125
- delete loadedPersonRecorded.meta;
1126
- const p1 = JSON.stringify(compPersonRecord);
1127
- const p2 = JSON.stringify(loadedPersonRecorded);
1128
- if (p1.localeCompare(p2) !== 0) {
1129
- this.runner.instrumentData.errorCount++;
1130
- return retVal.body;
1131
- }
1132
- const originalPersonRecord = retVal.body;
1133
- if (originalPersonRecord && originalPersonRecord.text) {
1134
- originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
1135
- const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
1136
- this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
1137
- const updatedRecord = { ...retVal.body };
1138
- delete updatedRecord.meta;
1139
- delete originalPersonRecord.meta;
1140
- const p1 = JSON.stringify(updatedRecord);
1141
- const p2 = JSON.stringify(originalPersonRecord);
1142
- if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
1143
- return retVal.body;
1144
- } else {
1145
- this.runner.instrumentData.errorCount++;
1146
- return null;
1147
- }
1148
- } catch (error) {
1096
+ PerformExecuteQuery = async () => {
1097
+ const __snapshot1 = performance.now();
1098
+ const client = await this.GetClient();
1099
+ const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1100
+ const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
1101
+ const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1102
+ const retVal = await client.GetResource("Person", personRecord.id);
1103
+ const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1104
+ this.runner.instrumentData.requestCount++;
1105
+ const compPersonRecord = { ...personRecord };
1106
+ const loadedPersonRecorded = { ...retVal.body };
1107
+ delete compPersonRecord.meta;
1108
+ delete loadedPersonRecorded.meta;
1109
+ const p1 = JSON.stringify(compPersonRecord);
1110
+ const p2 = JSON.stringify(loadedPersonRecorded);
1111
+ if (p1.localeCompare(p2) !== 0) {
1149
1112
  this.runner.instrumentData.errorCount++;
1150
- this.Error(`TestCaseFhir04:ExecuteQuery(): Error: [${error}]`);
1151
- throw error;
1113
+ return retVal.body;
1114
+ }
1115
+ const originalPersonRecord = retVal.body;
1116
+ if (originalPersonRecord && originalPersonRecord.text) {
1117
+ originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
1118
+ const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
1119
+ this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
1120
+ const updatedRecord = { ...retVal.body };
1121
+ delete updatedRecord.meta;
1122
+ delete originalPersonRecord.meta;
1123
+ const p1 = JSON.stringify(updatedRecord);
1124
+ const p2 = JSON.stringify(originalPersonRecord);
1125
+ if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
1126
+ return retVal.body;
1127
+ } else {
1128
+ this.runner.instrumentData.errorCount++;
1129
+ return null;
1152
1130
  }
1153
1131
  };
1154
1132
  };
1155
1133
  //#endregion
1156
1134
  //#region src/libmodule/testCaseFhir05.ts
1157
1135
  var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
1158
- ExecuteQuery = async () => {
1159
- try {
1160
- const __snapshot1 = performance.now();
1161
- const client = await this.GetClient();
1162
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1163
- const originalPersonRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "2");
1164
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1165
- if (originalPersonRecord && originalPersonRecord.text) {
1166
- originalPersonRecord.text.div = `Put record TestCaseFhir05 ${this.runner.iteration}`;
1167
- const retVal = await client.PutResource("Person", originalPersonRecord, `W/"2"`);
1168
- this._CheckOutputLongDurationError(__snapshot3, "await this.PutResource()");
1169
- const updatedRecord = { ...retVal.body };
1170
- delete updatedRecord.meta;
1171
- delete originalPersonRecord.meta;
1172
- const p1 = JSON.stringify(updatedRecord);
1173
- const p2 = JSON.stringify(originalPersonRecord);
1174
- if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
1175
- return retVal.body;
1176
- } else {
1177
- this.runner.instrumentData.errorCount++;
1178
- return null;
1179
- }
1180
- } catch (error) {
1136
+ PerformExecuteQuery = async () => {
1137
+ const __snapshot1 = performance.now();
1138
+ const client = await this.GetClient();
1139
+ const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1140
+ const originalPersonRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "2");
1141
+ const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1142
+ if (originalPersonRecord && originalPersonRecord.text) {
1143
+ originalPersonRecord.text.div = `Put record TestCaseFhir05 ${this.runner.iteration}`;
1144
+ const retVal = await client.PutResource("Person", originalPersonRecord, `W/"2"`);
1145
+ this._CheckOutputLongDurationError(__snapshot3, "await this.PutResource()");
1146
+ const updatedRecord = { ...retVal.body };
1147
+ delete updatedRecord.meta;
1148
+ delete originalPersonRecord.meta;
1149
+ const p1 = JSON.stringify(updatedRecord);
1150
+ const p2 = JSON.stringify(originalPersonRecord);
1151
+ if (p1.localeCompare(p2) !== 0) this.runner.instrumentData.errorCount++;
1152
+ return retVal.body;
1153
+ } else {
1181
1154
  this.runner.instrumentData.errorCount++;
1182
- this.Error(`TestCaseFhir05:ExecuteQuery(): Error: [${error}]`);
1183
- throw error;
1155
+ return null;
1184
1156
  }
1185
1157
  };
1186
1158
  };
1187
1159
  //#endregion
1188
1160
  //#region src/libmodule/testCaseFhir06.ts
1189
1161
  var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
1190
- ExecuteQuery = async () => {
1191
- try {
1192
- const __snapshot1 = performance.now();
1193
- const client = await this.GetClient();
1194
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1195
- const baseUrl = this.runner.options.fhirOptions.stsfhirbaseurl;
1196
- const prefix = this.runner.options.personPrefix;
1197
- const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "3");
1198
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1199
- const url = new URL(`${baseUrl}/Person?family=${personRecord.name[0].family}`);
1200
- let retVal;
1201
- if (this.runner.options.useDirectQuery === true) {
1202
- const data = {
1203
- queryTestingMode: this.runner.options.queryTestingMode,
1204
- family: personRecord.name[0].family
1205
- };
1206
- retVal = await client.GenericSearchTesting("Person", data);
1207
- this._CheckOutputLongDurationError(__snapshot3, "await this.GenericSearchTesting()");
1208
- } else {
1209
- retVal = await client.GetResources(url);
1210
- this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
1211
- }
1212
- return retVal.body;
1213
- } catch (error) {
1214
- this.runner.instrumentData.errorCount++;
1215
- this.Error(`TestCaseFhir06:ExecuteQuery(): Error: [${error}]`);
1216
- throw error;
1162
+ PerformExecuteQuery = async () => {
1163
+ const __snapshot1 = performance.now();
1164
+ const client = await this.GetClient();
1165
+ const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1166
+ const baseUrl = this.runner.options.fhirOptions.stsfhirbaseurl;
1167
+ const prefix = this.runner.options.personPrefix;
1168
+ const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "3");
1169
+ const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1170
+ const url = new URL(`${baseUrl}/Person?family=${personRecord.name[0].family}`);
1171
+ let retVal;
1172
+ if (this.runner.options.useDirectQuery === true) {
1173
+ const data = {
1174
+ queryTestingMode: this.runner.options.queryTestingMode,
1175
+ family: personRecord.name[0].family
1176
+ };
1177
+ retVal = await client.GenericSearchTesting("Person", data);
1178
+ this._CheckOutputLongDurationError(__snapshot3, "await this.GenericSearchTesting()");
1179
+ } else {
1180
+ retVal = await client.GetResources(url);
1181
+ this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
1217
1182
  }
1183
+ return retVal.body;
1218
1184
  };
1219
1185
  };
1220
1186
  //#endregion
@@ -1867,96 +1833,72 @@ var fast_json_patch_default = Object.assign({}, core_exports, duplex_exports, {
1867
1833
  //#endregion
1868
1834
  //#region src/libmodule/testCaseFhir07.ts
1869
1835
  var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
1870
- ExecuteQuery = async () => {
1871
- try {
1872
- const __snapshot1 = performance.now();
1873
- const client = await this.GetClient();
1874
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1875
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "3");
1876
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1877
- const retVal = await client.GetResource("Person", personRecord.id);
1878
- const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1879
- const resource = retVal.body;
1880
- const observer = fast_json_patch_default.observe(resource);
1881
- resource.text.div = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
1882
- const patchRecord = fast_json_patch_default.generate(observer);
1883
- const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
1884
- this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
1885
- return retValPatched.body;
1886
- } catch (error) {
1887
- this.runner.instrumentData.errorCount++;
1888
- this.Error(`TestCaseFhir07:ExecuteQuery(): Error: [${error}]`);
1889
- throw error;
1890
- }
1836
+ PerformExecuteQuery = async () => {
1837
+ const __snapshot1 = performance.now();
1838
+ const client = await this.GetClient();
1839
+ const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1840
+ const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "3");
1841
+ const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1842
+ const retVal = await client.GetResource("Person", personRecord.id);
1843
+ const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1844
+ const resource = retVal.body;
1845
+ const observer = fast_json_patch_default.observe(resource);
1846
+ resource.text.div = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
1847
+ const patchRecord = fast_json_patch_default.generate(observer);
1848
+ const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
1849
+ this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
1850
+ return retValPatched.body;
1891
1851
  };
1892
1852
  };
1893
1853
  //#endregion
1894
1854
  //#region src/libmodule/testCaseFhir08.ts
1895
1855
  var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
1896
- ExecuteQuery = async () => {
1897
- try {
1898
- const __snapshot1 = performance.now();
1899
- const client = await this.GetClient();
1900
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1901
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "4");
1902
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1903
- const retVal = await client.GetResource("Person", personRecord.id);
1904
- const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1905
- const resource = retVal.body;
1906
- resource.text.div = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
1907
- const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
1908
- this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
1909
- return retValPatched.body;
1910
- } catch (error) {
1911
- this.runner.instrumentData.errorCount++;
1912
- this.Error(`TestCaseFhir08:ExecuteQuery(): Error: [${error}]`);
1913
- throw error;
1914
- }
1856
+ PerformExecuteQuery = async () => {
1857
+ const __snapshot1 = performance.now();
1858
+ const client = await this.GetClient();
1859
+ const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1860
+ const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "4");
1861
+ const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1862
+ const retVal = await client.GetResource("Person", personRecord.id);
1863
+ const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1864
+ const resource = retVal.body;
1865
+ resource.text.div = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
1866
+ const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
1867
+ this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
1868
+ return retValPatched.body;
1915
1869
  };
1916
1870
  };
1917
1871
  //#endregion
1918
1872
  //#region src/libmodule/testCaseFhir09.ts
1919
1873
  var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
1920
- ExecuteQuery = async () => {
1921
- try {
1922
- const __snapshot1 = performance.now();
1923
- const client = await this.GetClient();
1924
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1925
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "5");
1926
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1927
- if (personRecord.text) {
1928
- const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
1929
- this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
1930
- return retVal.body;
1931
- } else {
1932
- this.runner.instrumentData.errorCount++;
1933
- return null;
1934
- }
1935
- } catch (error) {
1874
+ PerformExecuteQuery = async () => {
1875
+ const __snapshot1 = performance.now();
1876
+ const client = await this.GetClient();
1877
+ const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1878
+ const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "5");
1879
+ const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1880
+ if (personRecord.text) {
1881
+ const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
1882
+ this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
1883
+ return retVal.body;
1884
+ } else {
1936
1885
  this.runner.instrumentData.errorCount++;
1937
- this.Error(`TestCaseFhir09:ExecuteQuery(): Error: [${error}]`);
1938
- throw error;
1886
+ return null;
1939
1887
  }
1940
1888
  };
1941
1889
  };
1942
1890
  //#endregion
1943
1891
  //#region src/libmodule/testCaseFhir10.ts
1944
1892
  var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
1945
- ExecuteQuery = async () => {
1946
- try {
1947
- const __snapshot1 = performance.now();
1948
- const client = await this.GetClient();
1949
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1950
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
1951
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1952
- const retVal = await client.GetHistoryInstanceFhirResource("Person", personRecord.id, "2");
1953
- this._CheckOutputLongDurationError(__snapshot3, "await this.GetHistoryInstanceFhirResource()");
1954
- return retVal.body;
1955
- } catch (error) {
1956
- this.runner.instrumentData.errorCount++;
1957
- this.Error(`TestCaseFhir10:ExecuteQuery(): Error: [${error}]`);
1958
- throw error;
1959
- }
1893
+ PerformExecuteQuery = async () => {
1894
+ const __snapshot1 = performance.now();
1895
+ const client = await this.GetClient();
1896
+ const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1897
+ const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.runner.iteration, "1");
1898
+ const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1899
+ const retVal = await client.GetHistoryInstanceFhirResource("Person", personRecord.id, "2");
1900
+ this._CheckOutputLongDurationError(__snapshot3, "await this.GetHistoryInstanceFhirResource()");
1901
+ return retVal.body;
1960
1902
  };
1961
1903
  };
1962
1904
  //#endregion