Skip to content

Commit 540cb5f

Browse files
Merge pull request #215 from parthlambdatest/Dot-4568
[Dot-4568] add logs to show processing snapshot
2 parents d0a3ae7 + 11fde12 commit 540cb5f

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/commander/stopServer.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ command
1818
console.log(chalk.yellow(`Stopping server at ${serverAddress} from terminal...`));
1919

2020
// Send POST request to the /stop endpoint with the correct headers
21-
const response = await axios.post(`${serverAddress}/stop`, {}, {
21+
const response = await axios.post(`${serverAddress}/stop`, { timeout: 15000 }, {
2222
headers: {
2323
'Content-Type': 'application/json' // Ensure the correct Content-Type header
2424
}
@@ -33,7 +33,11 @@ command
3333
}
3434
} catch (error: any) {
3535
// Handle any errors during the HTTP request
36-
console.error(chalk.red('Error while stopping server'));
36+
if (error.code === 'ECONNABORTED') {
37+
console.error(chalk.red('Error: SmartUI server did not respond in 15 seconds'));
38+
} else {
39+
console.error(chalk.red('Error while stopping server'));
40+
}
3741
}
3842
});
3943

src/lib/snapshotQueue.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ export default class Queue {
270270
this.processingSnapshot = snapshot?.name;
271271
let drop = false;
272272

273+
if (this.ctx.isStartExec) {
274+
this.ctx.log.info(`Processing Snapshot: ${snapshot?.name}`);
275+
}
276+
273277
if (!this.ctx.config.delayedUpload && snapshot && snapshot.name && this.snapshotNames.includes(snapshot.name)) {
274278
drop = true;
275279
this.ctx.log.info(`Skipping duplicate SmartUI snapshot '${snapshot.name}'. To capture duplicate screenshots, please set the 'delayedUpload' configuration as true in your config file.`);

0 commit comments

Comments
 (0)