Make timing of minimongo observeChanges test more reliable.

This commit is contained in:
Ben Newman
2017-08-14 12:30:16 -04:00
parent 9ba9a359f5
commit 2dabbf0b60

View File

@@ -2532,10 +2532,12 @@ if (Meteor.isServer) {
self.events.push({evt: "a", id: id});
Meteor._sleepForMs(200);
self.events.push({evt: "b", id: id});
if (! self.two) {
self.two = self.C.insert({});
}
}
});
self.one = self.C.insert({});
self.two = self.C.insert({});
pollUntil(expect, function () {
return self.events.length === 4;
}, 10000);