Skip to content

Commit

Permalink
Merge pull request #440 from ryanseys/no-race-conditions
Browse files Browse the repository at this point in the history
Remove possibility of race conditions in pubsub reg tests
  • Loading branch information
stephenplusplus committed Mar 11, 2015
2 parents ed87968 + 305381f commit bc9a771
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions regression/pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('pubsub', function() {
assert.ifError(err);

subscription.pull({
returnImmediately: true,
returnImmediately: false,
maxResults: 1
}, function(err, msgs) {
assert.ifError(err);
Expand All @@ -216,10 +216,11 @@ describe('pubsub', function() {
assert.ifError(err);

subscription.pull({
returnImmediately: true,
returnImmediately: false,
maxResults: 1
}, function(err, msgs) {
assert.ifError(err);

var options = {
ackId: msgs[0].ackId,
seconds: 10
Expand Down Expand Up @@ -247,7 +248,7 @@ describe('pubsub', function() {
assert.ifError(err);

subscription.pull({
returnImmediately: true,
returnImmediately: false,
maxResults: 1
}, function(err, msgs) {
assert.ifError(err);
Expand Down Expand Up @@ -275,7 +276,7 @@ describe('pubsub', function() {
assert.ifError(err);

subscription.pull({
returnImmediately: true,
returnImmediately: false,
maxResults: 1
}, function(err, msgs) {
assert.ifError(err);
Expand All @@ -287,7 +288,7 @@ describe('pubsub', function() {

it('should receive the chosen amount of results', function(done) {
var subscription = topic.subscription(SUB_NAMES[1]);
var opts = { returnImmediately: true, maxResults: 3 };
var opts = { returnImmediately: false, maxResults: 3 };

topic.publish([
{ data: 'hello' },
Expand Down

0 comments on commit bc9a771

Please sign in to comment.