Skip to content

Commit f9c80d2

Browse files
committed
refactor(ReplSet): rename _startServer to _initServer
1 parent d554696 commit f9c80d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/mongodb-memory-server-core/src/MongoMemoryReplSet.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,12 @@ export default class MongoMemoryReplSet extends EventEmitter {
174174
// the `replSetInitiate` command against that server.
175175
const servers = this.opts.instanceOpts.map((opts) => {
176176
this.debug(' starting server from instanceOpts:', opts, '...');
177-
return this._startServer(this.getInstanceOpts(opts));
177+
return this._initServer(this.getInstanceOpts(opts));
178178
});
179179
const cnt = this.opts.replSet.count || 1;
180180
while (servers.length < cnt) {
181-
this.debug(' starting a server due to count...');
182-
const server = this._startServer(this.getInstanceOpts({}));
181+
this.debug(` starting ${cnt} servers...`);
182+
const server = this._initServer(this.getInstanceOpts({}));
183183
servers.push(server);
184184
}
185185
// ensures all servers are listening for connection
@@ -262,7 +262,7 @@ export default class MongoMemoryReplSet extends EventEmitter {
262262
}
263263
}
264264

265-
_startServer(instanceOpts: MongoMemoryInstancePropT): MongoMemoryServer {
265+
_initServer(instanceOpts: MongoMemoryInstancePropT): MongoMemoryServer {
266266
const serverOpts: MongoMemoryServerOptsT = {
267267
autoStart: false,
268268
debug: this.opts.debug,

0 commit comments

Comments
 (0)