From 878cd8d4ae4ad28d7aa925242d950a73d06c2aae Mon Sep 17 00:00:00 2001 From: David Glasser Date: Wed, 11 Dec 2013 00:34:16 -0800 Subject: [PATCH] Ensure new test passes with --disable-oplog --- packages/mongo-livedata/mongo_livedata_tests.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/mongo-livedata/mongo_livedata_tests.js b/packages/mongo-livedata/mongo_livedata_tests.js index 7296864cd8..d270592870 100644 --- a/packages/mongo-livedata/mongo_livedata_tests.js +++ b/packages/mongo-livedata/mongo_livedata_tests.js @@ -1906,9 +1906,10 @@ Meteor.isServer && Tinytest.add("mongo-livedata - oplog - include selector field // Wait until we've processed the insert oplog entry. (If the insert shows up // during the observeChanges, the bug in question is not consistently - // reproduced.) - MongoInternals.defaultRemoteCollectionDriver().mongo._oplogHandle.waitUntilCaughtUp(); - + // reproduced.) We don't have to do this for polling observe (eg + // --disable-oplog). + var oplog = MongoInternals.defaultRemoteCollectionDriver().mongo._oplogHandle; + oplog && oplog.waitUntilCaughtUp(); var output = []; var handle = coll.find({a: 1, b: 2}, {fields: {c: 1}}).observeChanges({