@dev-blinq/cucumber_client 1.0.1197-dev → 1.0.1199-dev
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.
|
@@ -197,7 +197,22 @@ class ScenarioReport {
|
|
|
197
197
|
// Increased the max retries to 3 and added exponential backoff to increase consistency but traded off availability :)
|
|
198
198
|
async _uploadScenario() {
|
|
199
199
|
try {
|
|
200
|
-
|
|
200
|
+
let scenarioDoc;
|
|
201
|
+
let attempts = 1;
|
|
202
|
+
while (attempts < MAX_RETRIES) {
|
|
203
|
+
try {
|
|
204
|
+
scenarioDoc = await this.scenarioUploadService.createScenarioDocument(this.name);
|
|
205
|
+
|
|
206
|
+
break; // exit loop if successful
|
|
207
|
+
} catch (err) {
|
|
208
|
+
attempts++;
|
|
209
|
+
await this._delay(2 ** attempts * 1000);
|
|
210
|
+
if (attempts >= MAX_RETRIES) {
|
|
211
|
+
logger.error(`Failed to upload scenario document (Attempt ${attempts})`);
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
201
216
|
const scenarioDocId = scenarioDoc._id;
|
|
202
217
|
const projectId = scenarioDoc.project_id;
|
|
203
218
|
this.scenario_id = scenarioDocId;
|
|
@@ -211,7 +226,7 @@ class ScenarioReport {
|
|
|
211
226
|
logger.info("Scenario uploaded successfully");
|
|
212
227
|
this.logReportLink(projectId, scenarioDocId);
|
|
213
228
|
} catch (err) {
|
|
214
|
-
logger.error("Scenario
|
|
229
|
+
logger.error("Scenario upload failed");
|
|
215
230
|
logger.debug("Error while uploading : ", err);
|
|
216
231
|
}
|
|
217
232
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-blinq/cucumber_client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1199-dev",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@cucumber/tag-expressions": "^6.1.1",
|
|
29
29
|
"@dev-blinq/cucumber-js": "1.0.172-dev",
|
|
30
30
|
"@faker-js/faker": "^8.1.0",
|
|
31
|
-
"automation_model": "1.0.
|
|
31
|
+
"automation_model": "1.0.723-dev",
|
|
32
32
|
"axios": "^1.7.4",
|
|
33
33
|
"chokidar": "^3.6.0",
|
|
34
34
|
"create-require": "^1.1.1",
|