Skip to content

Commit

Permalink
Fix flaky Test
Browse files Browse the repository at this point in the history
  • Loading branch information
dplewis committed Dec 22, 2020
1 parent e2e38f8 commit d65de9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/PushWorker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ describe('PushWorker', () => {
amount: 1,
},
count: { __op: 'Increment', amount: -1 },
status: 'running',
});
const query = new Parse.Query('_PushStatus');
return query.get(handler.objectId, { useMasterKey: true });
Expand Down Expand Up @@ -409,6 +410,7 @@ describe('PushWorker', () => {
amount: 1,
},
count: { __op: 'Increment', amount: -1 },
status: 'running',
});
done();
});
Expand Down
1 change: 1 addition & 0 deletions src/StatusHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export function pushStatusHandler(config, existingObjectId) {

// indicate this batch is complete
incrementOp(update, 'count', -1);
update.status = 'running';

return handler.update({ objectId }, update).then(res => {
if (res && res.count === 0) {
Expand Down

0 comments on commit d65de9e

Please sign in to comment.