Skip to content

Commit 44c6130

Browse files
Merge pull request #89 from japneetlambdatest/MLE-6963
Mle 6963
2 parents af1e82a + 340b67c commit 44c6130

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

commands/generate_reports.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ function download_artefact(username, access_key, env, test_id, file_path) {
1111
return new Promise(function (resolve, reject) {
1212
let response_code;
1313
if (!fs.existsSync(file_path)) {
14-
console.log("Creating paths");
1514
fs.mkdirSync(file_path, { recursive: true });
1615
}
1716
let old_path = file_path;
@@ -27,6 +26,7 @@ function download_artefact(username, access_key, env, test_id, file_path) {
2726
password: access_key,
2827
},
2928
gzip: true,
29+
timeout: 120000,
3030
},
3131
(err, res, body) => {
3232
if (err) {
@@ -45,6 +45,7 @@ function download_artefact(username, access_key, env, test_id, file_path) {
4545
zip.on("ready", () => {
4646
zip.extract(null, old_path, (err, count) => {
4747
zip.close();
48+
fs.unlinkSync(file_path);
4849
resolve(
4950
err
5051
? "Extract error for " + test_id
@@ -53,10 +54,9 @@ function download_artefact(username, access_key, env, test_id, file_path) {
5354
});
5455
});
5556
} else {
57+
fs.unlinkSync(file_path);
5658
reject("Could not download artefacts for test id " + test_id);
5759
}
58-
//delete the zip file
59-
fs.unlinkSync(file_path);
6060
})
6161
);
6262
});

0 commit comments

Comments
 (0)