File tree Expand file tree Collapse file tree 6 files changed +69
-45
lines changed
test/spec/server-discovery-and-monitoring/integration Expand file tree Collapse file tree 6 files changed +69
-45
lines changed Original file line number Diff line number Diff line change 117
117
"failPoint" : {
118
118
"configureFailPoint" : " failCommand" ,
119
119
"mode" : {
120
- "times" : 4
120
+ "times" : 2
121
121
},
122
122
"data" : {
123
123
"failCommands" : [
162
162
}
163
163
]
164
164
}
165
+ },
166
+ {
167
+ "name" : " assertEventCount" ,
168
+ "object" : " testRunner" ,
169
+ "arguments" : {
170
+ "event" : " ServerMarkedUnknownEvent" ,
171
+ "count" : 1
172
+ }
173
+ },
174
+ {
175
+ "name" : " assertEventCount" ,
176
+ "object" : " testRunner" ,
177
+ "arguments" : {
178
+ "event" : " PoolClearedEvent" ,
179
+ "count" : 1
180
+ }
165
181
}
166
182
],
167
183
"expectations" : [
Original file line number Diff line number Diff line change @@ -84,16 +84,15 @@ tests:
84
84
documents :
85
85
- _id : 1
86
86
- _id : 2
87
- # Configure the next streaming hello check to fail with a command error.
88
- # Use "times: 4" to increase the probability that the Monitor check fails
89
- # since the RTT hello may trigger this failpoint one or many times as
90
- # well.
87
+ # Configure the next streaming hello check to fail with a command
88
+ # error.
89
+ # Use times: 2 so that the RTT hello is blocked as well.
91
90
- name : configureFailPoint
92
91
object : testRunner
93
92
arguments :
94
93
failPoint :
95
94
configureFailPoint : failCommand
96
- mode : { times: 4 }
95
+ mode : { times: 2 }
97
96
data :
98
97
failCommands : ["hello", "isMaster"]
99
98
appName : commandErrorCheckTest
@@ -120,19 +119,17 @@ tests:
120
119
documents :
121
120
- _id : 3
122
121
- _id : 4
123
- # We cannot assert the server was marked Unknown and pool was cleared an
124
- # exact number of times because the RTT hello may have triggered this
125
- # failpoint one or many times as well.
126
- # - name: assertEventCount
127
- # object: testRunner
128
- # arguments:
129
- # event: ServerMarkedUnknownEvent
130
- # count: 1
131
- # - name: assertEventCount
132
- # object: testRunner
133
- # arguments:
134
- # event: PoolClearedEvent
135
- # count: 1
122
+ # Assert the server was marked Unknown and pool was cleared exactly once.
123
+ - name : assertEventCount
124
+ object : testRunner
125
+ arguments :
126
+ event : ServerMarkedUnknownEvent
127
+ count : 1
128
+ - name : assertEventCount
129
+ object : testRunner
130
+ arguments :
131
+ event : PoolClearedEvent
132
+ count : 1
136
133
137
134
expectations :
138
135
- command_started_event :
Original file line number Diff line number Diff line change 116
116
"failPoint" : {
117
117
"configureFailPoint" : " failCommand" ,
118
118
"mode" : {
119
- "times" : 4
119
+ "times" : 2
120
120
},
121
121
"data" : {
122
122
"failCommands" : [
Original file line number Diff line number Diff line change @@ -84,15 +84,14 @@ tests:
84
84
- _id : 1
85
85
- _id : 2
86
86
# Configure the next streaming hello check to fail with a non-timeout
87
- # network error. Use "times: 4" to increase the probability that the
88
- # Monitor check fails since the RTT hello may trigger this failpoint one
89
- # or many times as well.
87
+ # network error. Use times: 2 to ensure that the the Monitor check fails
88
+ # since the RTT hello may trigger this failpoint as well.
90
89
- name : configureFailPoint
91
90
object : testRunner
92
91
arguments :
93
92
failPoint :
94
93
configureFailPoint : failCommand
95
- mode : { times: 4 }
94
+ mode : { times: 2 }
96
95
data :
97
96
failCommands : ["hello", "isMaster"]
98
97
appName : networkErrorCheckTest
@@ -117,8 +116,8 @@ tests:
117
116
- _id : 3
118
117
- _id : 4
119
118
# We cannot assert the server was marked Unknown and pool was cleared an
120
- # exact number of times because the RTT hello may have triggered this
121
- # failpoint one or many times as well.
119
+ # exact number of times because the RTT hello may or may not have
120
+ # triggered this failpoint as well.
122
121
# - name: assertEventCount
123
122
# object: testRunner
124
123
# arguments:
Original file line number Diff line number Diff line change 117
117
"failPoint" : {
118
118
"configureFailPoint" : " failCommand" ,
119
119
"mode" : {
120
- "times" : 4
120
+ "times" : 2
121
121
},
122
122
"data" : {
123
123
"failCommands" : [
160
160
}
161
161
]
162
162
}
163
+ },
164
+ {
165
+ "name" : " assertEventCount" ,
166
+ "object" : " testRunner" ,
167
+ "arguments" : {
168
+ "event" : " ServerMarkedUnknownEvent" ,
169
+ "count" : 1
170
+ }
171
+ },
172
+ {
173
+ "name" : " assertEventCount" ,
174
+ "object" : " testRunner" ,
175
+ "arguments" : {
176
+ "event" : " PoolClearedEvent" ,
177
+ "count" : 1
178
+ }
163
179
}
164
180
],
165
181
"expectations" : [
Original file line number Diff line number Diff line change @@ -84,16 +84,14 @@ tests:
84
84
documents :
85
85
- _id : 1
86
86
- _id : 2
87
- # Configure the next streaming hello check to fail with a timeout.
88
- # Use "times: 4" to increase the probability that the Monitor check times
89
- # out since the RTT hello may trigger this failpoint one or many times as
90
- # well.
87
+ # Configure the next streaming hello check to fail with a timeout
88
+ # Use times: 2 so that the RTT hello is blocked as well.
91
89
- name : configureFailPoint
92
90
object : testRunner
93
91
arguments :
94
92
failPoint :
95
93
configureFailPoint : failCommand
96
- mode : { times: 4 }
94
+ mode : { times: 2 }
97
95
data :
98
96
failCommands : ["hello", "isMaster"]
99
97
appName : timeoutMonitorCheckTest
@@ -121,19 +119,17 @@ tests:
121
119
documents :
122
120
- _id : 3
123
121
- _id : 4
124
- # We cannot assert the server was marked Unknown and pool was cleared an
125
- # exact number of times because the RTT hello may have triggered this
126
- # failpoint one or many times as well.
127
- # - name: assertEventCount
128
- # object: testRunner
129
- # arguments:
130
- # event: ServerMarkedUnknownEvent
131
- # count: 1
132
- # - name: assertEventCount
133
- # object: testRunner
134
- # arguments:
135
- # event: PoolClearedEvent
136
- # count: 1
122
+ # Assert the server was marked Unknown and pool was cleared exactly once.
123
+ - name : assertEventCount
124
+ object : testRunner
125
+ arguments :
126
+ event : ServerMarkedUnknownEvent
127
+ count : 1
128
+ - name : assertEventCount
129
+ object : testRunner
130
+ arguments :
131
+ event : PoolClearedEvent
132
+ count : 1
137
133
138
134
expectations :
139
135
- command_started_event :
You can’t perform that action at this time.
0 commit comments