Skip to content

Commit 746ccb1

Browse files
authored
fix: insensitive the regexp when a primary is elected (#294)
insensitive the regexp when a primary is elected because on mongo 4.4 the stdout message has a capital letter closes #292
1 parent c175714 commit 746ccb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mongodb-memory-server-core/src/util/MongoInstance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export default class MongoInstance {
271271
}
272272
} else if (/\*\*\*aborting after/i.test(line)) {
273273
this.instanceFailed('Mongod internal error');
274-
} else if (/transition to primary complete; database writes are now permitted/.test(line)) {
274+
} else if (/transition to primary complete; database writes are now permitted/i.test(line)) {
275275
this.isInstancePrimary = true;
276276
this.debug('Calling all waitForPrimary resolve functions');
277277
this.waitForPrimaryResolveFns.forEach((resolveFn) => resolveFn(true));

0 commit comments

Comments
 (0)