File tree 2 files changed +49
-3
lines changed
2 files changed +49
-3
lines changed Original file line number Diff line number Diff line change 2
2
"tests" : [
3
3
{
4
4
"description" : " Valid connection pool options are parsed correctly" ,
5
- "uri" : " mongodb://example.com/?maxIdleTimeMS=50000" ,
5
+ "uri" : " mongodb://example.com/?maxIdleTimeMS=50000&maxPoolSize=5&minPoolSize=3 " ,
6
6
"valid" : true ,
7
7
"warning" : false ,
8
8
"hosts" : null ,
9
9
"auth" : null ,
10
10
"options" : {
11
- "maxIdleTimeMS" : 50000
11
+ "maxIdleTimeMS" : 50000 ,
12
+ "maxPoolSize" : 5 ,
13
+ "minPoolSize" : 3
12
14
}
13
15
},
14
16
{
28
30
"hosts" : null ,
29
31
"auth" : null ,
30
32
"options" : {}
33
+ },
34
+ {
35
+ "description" : " maxPoolSize=0 does not error" ,
36
+ "uri" : " mongodb://example.com/?maxPoolSize=0" ,
37
+ "valid" : true ,
38
+ "warning" : false ,
39
+ "hosts" : null ,
40
+ "auth" : null ,
41
+ "options" : {
42
+ "maxPoolSize" : 0
43
+ }
44
+ },
45
+ {
46
+ "description" : " minPoolSize=0 does not error" ,
47
+ "uri" : " mongodb://example.com/?minPoolSize=0" ,
48
+ "valid" : true ,
49
+ "warning" : false ,
50
+ "hosts" : null ,
51
+ "auth" : null ,
52
+ "options" : {
53
+ "minPoolSize" : 0
54
+ }
31
55
}
32
56
]
33
57
}
Original file line number Diff line number Diff line change 1
1
tests :
2
2
-
3
3
description : " Valid connection pool options are parsed correctly"
4
- uri : " mongodb://example.com/?maxIdleTimeMS=50000"
4
+ uri : " mongodb://example.com/?maxIdleTimeMS=50000&maxPoolSize=5&minPoolSize=3 "
5
5
valid : true
6
6
warning : false
7
7
hosts : ~
8
8
auth : ~
9
9
options :
10
10
maxIdleTimeMS : 50000
11
+ maxPoolSize : 5
12
+ minPoolSize : 3
11
13
-
12
14
description : " Non-numeric maxIdleTimeMS causes a warning"
13
15
uri : " mongodb://example.com/?maxIdleTimeMS=invalid"
@@ -24,3 +26,23 @@ tests:
24
26
hosts : ~
25
27
auth : ~
26
28
options : {}
29
+
30
+ -
31
+ description : " maxPoolSize=0 does not error"
32
+ uri : " mongodb://example.com/?maxPoolSize=0"
33
+ valid : true
34
+ warning : false
35
+ hosts : ~
36
+ auth : ~
37
+ options :
38
+ maxPoolSize : 0
39
+
40
+ -
41
+ description : " minPoolSize=0 does not error"
42
+ uri : " mongodb://example.com/?minPoolSize=0"
43
+ valid : true
44
+ warning : false
45
+ hosts : ~
46
+ auth : ~
47
+ options :
48
+ minPoolSize : 0
You can’t perform that action at this time.
0 commit comments