Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
brizental committed Dec 8, 2021
1 parent a8e515d commit b8dc28a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions glean/src/core/upload/worker.ts
Expand Up @@ -35,6 +35,7 @@ class PingUploadWorker {
//
// This is necessary in case we need to clear the timeout due to aborting the worker.
private waitTimeoutId?: number;

// A resolver for the waiting promise created due to a Wait signal.
//
// This is necessary for the case when the worker is aborted and the timeout cleared.
Expand Down
2 changes: 1 addition & 1 deletion glean/tests/unit/core/upload/worker.spec.ts
Expand Up @@ -153,7 +153,7 @@ describe("PingUploadWorker", function() {

// !BIG HACK! Wait just a tiny bit so that the worker has time to process the wait request.
// Make sure we at least don't wait too much so that we are not in "wait mode" anymore.
await new Promise(resolve => setTimeout(resolve, 10));
await new Promise(resolve => setTimeout(resolve, MOCK_WAIT_TIME * 0.1));

// Check that the worker is put in "wait mode".
assert.ok(!isUndefined(worker["waitPromiseResolver"]));
Expand Down

0 comments on commit b8dc28a

Please sign in to comment.