Skip to content

Commit 1b5680f

Browse files
committed
chore: comments
1 parent a783f21 commit 1b5680f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

bin/testObservability/helper/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ exports.TEST_OBSERVABILITY_REPORTER = 'browserstack-cypress-cli/bin/testObservab
3333

3434
exports.TEST_OBSERVABILITY_REPORTER_LOCAL = path.join(__dirname, '..', 'reporter');
3535

36-
exports.PENDING_QUEUS_FILE = `pending_queus_${process.pid}.json`;
36+
exports.PENDING_QUEUS_FILE = `pending_queues_${process.pid}.json`;

bin/testObservability/helper/requestQueueHandler.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ const fs = require('fs');
22
const cp = require('child_process');
33
const path = require('path');
44

5-
const { BATCH_SIZE, BATCH_INTERVAL, consoleHolder, PENDING_QUEUS_FILE } = require('./constants');
6-
const { debug, batchAndPostEvents } = require('./helper');
5+
const { BATCH_SIZE, BATCH_INTERVAL, PENDING_QUEUES_FILE } = require('./constants');
6+
const { batchAndPostEvents } = require('./helper');
77

88
class RequestQueueHandler {
99
constructor() {
@@ -55,9 +55,10 @@ class RequestQueueHandler {
5555
shutdownSync = () => {
5656
this.removeEventBatchPolling('REMOVING');
5757

58-
fs.writeFileSync(path.join(__dirname, PENDING_QUEUS_FILE), JSON.stringify(this.queue));
58+
fs.writeFileSync(path.join(__dirname, PENDING_QUEUES_FILE), JSON.stringify(this.queue));
5959
this.queue = [];
6060
cp.spawnSync('node', [path.join(__dirname, 'cleanupQueueSync.js'), path.join(__dirname, PENDING_QUEUS_FILE)], {stdio: 'inherit'});
61+
fs.unlinkSync(path.join(__dirname, PENDING_QUEUES_FILE));
6162
}
6263

6364
shutdown = async () => {

0 commit comments

Comments
 (0)