|
Multiple instances of the ReplTest, ReplSetTest, and ShardingTest shell helpers cannot be used at the same time, or even by the same mongo shell without passing the "startPort" parameter to the constructor.
var a = new ReplSetTest({name: 'a', nodes: 1});
|
var b = new ReplSetTest({name: 'b', nodes: 1, startPort: 31010});
|
var c = new ReplSetTest({name: 'c', nodes: 1});
|
a.startSet();
|
b.startSet(); // OK because we start at port 31010.
|
c.startSet(); // This will fail to acquire port 31000.
|
ReplSetTest Starting....
|
Resetting db path '/data/db/c-0'
|
2015-04-29T21:02:20.277-0400 I - already have db for port: 31000
|
2015-04-29T21:02:20.277-0400 I - Assertion failure !haveDbForPort src/mongo/shell/shell_utils_launcher.cpp 268
|
...
|
2015-04-29T21:02:20.283-0400 E QUERY Error: assertion src/mongo/shell/shell_utils_launcher.cpp:268
|
at Function.MongoRunner.startWithArgs (src/mongo/shell/servers.js:841:34)
|
at Function.MongoRunner.runMongod (src/mongo/shell/servers.js:595:30)
|
at ReplSetTest.start (src/mongo/shell/replsettest.js:689:44)
|
at ReplSetTest.startSet (src/mongo/shell/replsettest.js:258:21)
|
at (shell):1:3 at src/mongo/shell/servers.js:841
|
|