Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
set delay before inserting Account to wait subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
stomita committed Jun 26, 2012
1 parent f56146f commit 6ede617
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/streaming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ vows.describe("streaming").addBatch({
conn.topic(config.pushTopicName).subscribe(function(msg) {
callback(null, msg);
});
conn.sobject('Account').create({
Name: 'My New Account #'+Date.now()
}, function() {});
// wait 5 secs for subscription complete
setTimeout(function() {
conn.sobject('Account').create({
Name: 'My New Account #'+Date.now()
}, function() {});
}, 5000);
},
", then receive event account created" : function(msg) {
assert.equal("created", msg.event.type);
Expand Down

0 comments on commit 6ede617

Please sign in to comment.