File tree Expand file tree Collapse file tree 11 files changed +164
-131
lines changed
server_selection/in_window Expand file tree Collapse file tree 11 files changed +164
-131
lines changed Original file line number Diff line number Diff line change 20
20
}
21
21
]
22
22
},
23
- "in_window " : [
23
+ "mocked_topology_state " : [
24
24
{
25
25
"address" : " a:27017" ,
26
26
"operation_count" : 5
34
34
"operation_count" : 5
35
35
}
36
36
],
37
- "expected_frequencies" : {
38
- "a:27017" : 0.33 ,
39
- "b:27017" : 0.33 ,
40
- "c:27017" : 0.33
37
+ "iterations" : 2000 ,
38
+ "outcome" : {
39
+ "tolerance" : 0.05 ,
40
+ "expected_frequencies" : {
41
+ "a:27017" : 0.33 ,
42
+ "b:27017" : 0.33 ,
43
+ "c:27017" : 0.33
44
+ }
41
45
}
42
46
}
Original file line number Diff line number Diff line change 50
50
}
51
51
]
52
52
},
53
- "in_window " : [
53
+ "mocked_topology_state " : [
54
54
{
55
55
"address" : " a:27017" ,
56
56
"operation_count" : 0
88
88
"operation_count" : 60
89
89
}
90
90
],
91
- "expected_frequencies" : {
92
- "a:27017" : 0.22 ,
93
- "b:27017" : 0.18 ,
94
- "c:27017" : 0.18 ,
95
- "d:27017" : 0.125 ,
96
- "e:27017" : 0.125 ,
97
- "f:27017" : 0.074 ,
98
- "g:27017" : 0.074 ,
99
- "h:27017" : 0.0277 ,
100
- "i:27017" : 0
91
+ "iterations" : 10000 ,
92
+ "outcome" : {
93
+ "tolerance" : 0.03 ,
94
+ "expected_frequencies" : {
95
+ "a:27017" : 0.22 ,
96
+ "b:27017" : 0.18 ,
97
+ "c:27017" : 0.18 ,
98
+ "d:27017" : 0.125 ,
99
+ "e:27017" : 0.125 ,
100
+ "f:27017" : 0.074 ,
101
+ "g:27017" : 0.074 ,
102
+ "h:27017" : 0.0277 ,
103
+ "i:27017" : 0
104
+ }
101
105
}
102
106
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 20
20
}
21
21
]
22
22
},
23
- "in_window " : [
23
+ "mocked_topology_state " : [
24
24
{
25
25
"address" : " a:27017" ,
26
26
"operation_count" : 16
34
34
"operation_count" : 16
35
35
}
36
36
],
37
- "expected_frequencies" : {
38
- "a:27017" : 0.165 ,
39
- "b:27017" : 0.66 ,
40
- "c:27017" : 0.165
37
+ "iterations" : 2000 ,
38
+ "outcome" : {
39
+ "tolerance" : 0.05 ,
40
+ "expected_frequencies" : {
41
+ "a:27017" : 0.165 ,
42
+ "b:27017" : 0.66 ,
43
+ "c:27017" : 0.165
44
+ }
41
45
}
42
46
}
Original file line number Diff line number Diff line change
1
+ {
2
+ "description" : " When in equilibrium selection is evenly distributed (replica set)" ,
3
+ "topology_description" : {
4
+ "type" : " ReplicaSetWithPrimary" ,
5
+ "servers" : [
6
+ {
7
+ "address" : " a:27017" ,
8
+ "avg_rtt_ms" : 35 ,
9
+ "type" : " RSPrimary"
10
+ },
11
+ {
12
+ "address" : " b:27017" ,
13
+ "avg_rtt_ms" : 35 ,
14
+ "type" : " RSSecondary"
15
+ },
16
+ {
17
+ "address" : " c:27017" ,
18
+ "avg_rtt_ms" : 35 ,
19
+ "type" : " RSSecondary"
20
+ }
21
+ ]
22
+ },
23
+ "mocked_topology_state" : [
24
+ {
25
+ "address" : " a:27017" ,
26
+ "operation_count" : 6
27
+ },
28
+ {
29
+ "address" : " b:27017" ,
30
+ "operation_count" : 6
31
+ },
32
+ {
33
+ "address" : " c:27017" ,
34
+ "operation_count" : 6
35
+ }
36
+ ],
37
+ "iterations" : 2000 ,
38
+ "outcome" : {
39
+ "tolerance" : 0.05 ,
40
+ "expected_frequencies" : {
41
+ "a:27017" : 0.33 ,
42
+ "b:27017" : 0.33 ,
43
+ "c:27017" : 0.33
44
+ }
45
+ }
46
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "description" : " Selections from three servers occur at proper distributions (replica set)" ,
3
+ "topology_description" : {
4
+ "type" : " ReplicaSetWithPrimary" ,
5
+ "servers" : [
6
+ {
7
+ "address" : " a:27017" ,
8
+ "avg_rtt_ms" : 35 ,
9
+ "type" : " RSPrimary"
10
+ },
11
+ {
12
+ "address" : " b:27017" ,
13
+ "avg_rtt_ms" : 35 ,
14
+ "type" : " RSSecondary"
15
+ },
16
+ {
17
+ "address" : " c:27017" ,
18
+ "avg_rtt_ms" : 35 ,
19
+ "type" : " RSSecondary"
20
+ }
21
+ ]
22
+ },
23
+ "mocked_topology_state" : [
24
+ {
25
+ "address" : " a:27017" ,
26
+ "operation_count" : 3
27
+ },
28
+ {
29
+ "address" : " b:27017" ,
30
+ "operation_count" : 6
31
+ },
32
+ {
33
+ "address" : " c:27017" ,
34
+ "operation_count" : 20
35
+ }
36
+ ],
37
+ "iterations" : 2000 ,
38
+ "outcome" : {
39
+ "tolerance" : 0.05 ,
40
+ "expected_frequencies" : {
41
+ "a:27017" : 0.66 ,
42
+ "b:27017" : 0.33 ,
43
+ "c:27017" : 0
44
+ }
45
+ }
46
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
{
2
- "description" : " Server with least connections and most available connections selected most " ,
2
+ "description" : " Selections from three servers occur at proper distributions " ,
3
3
"topology_description" : {
4
4
"type" : " Sharded" ,
5
5
"servers" : [
20
20
}
21
21
]
22
22
},
23
- "in_window " : [
23
+ "mocked_topology_state " : [
24
24
{
25
25
"address" : " a:27017" ,
26
26
"operation_count" : 3
34
34
"operation_count" : 20
35
35
}
36
36
],
37
- "expected_frequencies" : {
38
- "a:27017" : 0.66 ,
39
- "b:27017" : 0.33 ,
40
- "c:27017" : 0
37
+ "iterations" : 2000 ,
38
+ "outcome" : {
39
+ "tolerance" : 0.05 ,
40
+ "expected_frequencies" : {
41
+ "a:27017" : 0.66 ,
42
+ "b:27017" : 0.33 ,
43
+ "c:27017" : 0
44
+ }
41
45
}
42
46
}
Original file line number Diff line number Diff line change 15
15
}
16
16
]
17
17
},
18
- "in_window " : [
18
+ "mocked_topology_state " : [
19
19
{
20
20
"address" : " a:27017" ,
21
21
"operation_count" : 0
25
25
"operation_count" : 5
26
26
}
27
27
],
28
- "expected_frequencies" : {
29
- "a:27017" : 1 ,
30
- "b:27017" : 0
28
+ "iterations" : 100 ,
29
+ "outcome" : {
30
+ "tolerance" : 0 ,
31
+ "expected_frequencies" : {
32
+ "a:27017" : 1 ,
33
+ "b:27017" : 0
34
+ }
31
35
}
32
36
}
Original file line number Diff line number Diff line change 20
20
}
21
21
]
22
22
},
23
- "in_window " : [
23
+ "mocked_topology_state " : [
24
24
{
25
25
"address" : " a:27017" ,
26
26
"operation_count" : 10
34
34
"operation_count" : 16
35
35
}
36
36
],
37
- "expected_frequencies" : {
38
- "a:27017" : 0.5 ,
39
- "b:27017" : 0.5 ,
40
- "c:27017" : 0
37
+ "iterations" : 2000 ,
38
+ "outcome" : {
39
+ "tolerance" : 0.05 ,
40
+ "expected_frequencies" : {
41
+ "a:27017" : 0.5 ,
42
+ "b:27017" : 0.5 ,
43
+ "c:27017" : 0
44
+ }
41
45
}
42
46
}
You can’t perform that action at this time.
0 commit comments