mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge remote-tracking branch 'origin/upgrade-mongo-5-callbacks' into upgrade-mongo-5-callbacks
This commit is contained in:
@@ -226,14 +226,9 @@ export class OplogHandle {
|
||||
);
|
||||
|
||||
try {
|
||||
const isMasterDoc = await new Promise<any>((resolve, reject) => {
|
||||
this._oplogLastEntryConnection!.db
|
||||
.admin()
|
||||
.command({ ismaster: 1 }, (err: Error | null, result: any) => {
|
||||
if (err) reject(err);
|
||||
else resolve(result);
|
||||
});
|
||||
});
|
||||
const isMasterDoc = await this._oplogLastEntryConnection!.db
|
||||
.admin()
|
||||
.command({ ismaster: 1 });
|
||||
|
||||
if (!(isMasterDoc && isMasterDoc.setName)) {
|
||||
throw new Error("$MONGO_OPLOG_URL must be set to the 'local' database of a Mongo replica set");
|
||||
@@ -426,4 +421,4 @@ export function idForOp(op: OplogEntry): string {
|
||||
} else {
|
||||
throw Error("Unknown op: " + JSON.stringify(op));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -495,6 +495,7 @@ if (Meteor.isServer) {
|
||||
self.handle = await cursor.observeChanges({
|
||||
added: function(id, fields) {
|
||||
self.xs.push(fields.x);
|
||||
console.log('self.expects.length', self.expects);
|
||||
test.notEqual(self.expects.length, 0);
|
||||
self.expects.pop()();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user