Skip to content

Commit

Permalink
Stabilize some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed Jan 7, 2017
1 parent 028a5d7 commit 14945e0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pubsub/system-test/subscriptions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ test.serial(`should pull ordered messages`, async (t) => {
results = await pubsub.topic(topicNameTwo).publish({ data: expected, attributes: { counterId: '1' } }, { raw: true });
results = await pubsub.topic(topicNameTwo).publish({ data: expected, attributes: { counterId: '2' } }, { raw: true });
publishedMessageIds.push(results[0][0]);
await subscriptions.pullOrderedMessages(subscriptionNameThree);
t.is(console.log.callCount, 3);
t.deepEqual(console.log.secondCall.args, [`* %d %j %j`, publishedMessageIds[2], expected, { counterId: '2' }]);
t.deepEqual(console.log.thirdCall.args, [`* %d %j %j`, publishedMessageIds[0], expected, { counterId: '3' }]);
await tryTest(async () => {
await subscriptions.pullOrderedMessages(subscriptionNameThree);
t.is(console.log.callCount, 3);
t.deepEqual(console.log.secondCall.args, [`* %d %j %j`, publishedMessageIds[2], expected, { counterId: '2' }]);
t.deepEqual(console.log.thirdCall.args, [`* %d %j %j`, publishedMessageIds[0], expected, { counterId: '3' }]);
});
});

test.serial(`should set the IAM policy for a subscription`, async (t) => {
Expand Down

0 comments on commit 14945e0

Please sign in to comment.