Commit 14d7c8b 1 parent 7189b37 commit 14d7c8b Copy full SHA for 14d7c8b
File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -31,12 +31,13 @@ import (
31
31
"github.com/juju/errors"
32
32
"github.com/juju/loggo"
33
33
"github.com/juju/retry"
34
- jc "github.com/juju/testing/checkers"
35
34
"github.com/juju/utils/v2"
36
35
"github.com/juju/version"
37
36
gc "gopkg.in/check.v1"
38
37
"gopkg.in/mgo.v2"
39
38
"gopkg.in/mgo.v2/bson"
39
+
40
+ jc "github.com/juju/testing/checkers"
40
41
)
41
42
42
43
var (
45
46
logger = loggo .GetLogger ("juju.testing" )
46
47
47
48
// regular expression to match output of mongod
48
- waitingForConnectionsRe = regexp .MustCompile (".*waiting for connections.*" )
49
+ waitingForConnectionsRe = regexp .MustCompile (".*[W|w]aiting for connections.*" )
49
50
50
51
mongo32 = version.Number {Major : 3 , Minor : 2 }
51
52
@@ -287,9 +288,6 @@ func (inst *MgoInstance) run() error {
287
288
mgoargs := []string {
288
289
"--dbpath" , inst .dir ,
289
290
"--port" , mgoport ,
290
- "--nssize" , "1" ,
291
- "--noprealloc" ,
292
- "--smallfiles" ,
293
291
"--oplogSize" , "10" ,
294
292
"--ipv6" ,
295
293
"--setParameter" , "enableTestCommands=1" ,
@@ -330,6 +328,10 @@ func (inst *MgoInstance) run() error {
330
328
storageEngine := mongoStorageEngine (inst .EnableReplicaSet )
331
329
if storageEngine != "" {
332
330
mgoargs = append (mgoargs , "--storageEngine" , storageEngine )
331
+ if storageEngine == "mmapv1" {
332
+ mgoargs = append (mgoargs , "--nssize" , "1" )
333
+ mgoargs = append (mgoargs , "--noprealloc" , "--smallfiles" )
334
+ }
333
335
}
334
336
}
335
337
You can’t perform that action at this time.
0 commit comments