@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(host_not_flapping)
73
73
int i = 0 ;
74
74
while (i++ < 10 ) {
75
75
// For some reason, elusive to me, the first check is a state change
76
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
76
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
77
77
78
78
LogFlapping (host);
79
79
LogHostStatus (host);
@@ -107,9 +107,9 @@ BOOST_AUTO_TEST_CASE(host_flapping)
107
107
int i = 0 ;
108
108
while (i++ < 25 ) {
109
109
if (i % 2 )
110
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
110
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
111
111
else
112
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
112
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
113
113
114
114
LogFlapping (host);
115
115
LogHostStatus (host);
@@ -144,18 +144,18 @@ BOOST_AUTO_TEST_CASE(host_flapping_recover)
144
144
Utility::SetTime (0 );
145
145
146
146
// A few warning
147
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
148
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
149
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
150
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
147
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
148
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
149
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
150
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
151
151
152
152
LogFlapping (host);
153
153
LogHostStatus (host);
154
154
for (int i = 0 ; i <= 7 ; i++) {
155
155
if (i % 2 )
156
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
156
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
157
157
else
158
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
158
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
159
159
}
160
160
161
161
LogFlapping (host);
@@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(host_flapping_recover)
171
171
BOOST_CHECK (host->GetFlappingCurrent () > 25.0 );
172
172
BOOST_CHECK (host->IsFlapping ());
173
173
174
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
174
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
175
175
LogFlapping (host);
176
176
LogHostStatus (host);
177
177
count++;
@@ -203,40 +203,40 @@ BOOST_AUTO_TEST_CASE(host_flapping_docs_example)
203
203
204
204
Utility::SetTime (0 );
205
205
206
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
207
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
208
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
209
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
210
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
211
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
212
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
213
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
214
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
215
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
216
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
217
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
218
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
219
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
220
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
221
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
222
- host->ProcessCheckResult (MakeCheckResult (ServiceOK));
223
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
224
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
225
- host->ProcessCheckResult (MakeCheckResult (ServiceWarning));
226
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
206
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
207
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
208
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
209
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
210
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
211
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
212
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
213
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
214
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
215
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
216
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
217
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
218
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
219
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
220
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
221
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
222
+ host->ProcessCheckResult (MakeCheckResult (ServiceOK), new UnitTestCRP () );
223
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
224
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
225
+ host->ProcessCheckResult (MakeCheckResult (ServiceWarning), new UnitTestCRP () );
226
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
227
227
228
228
LogFlapping (host);
229
229
LogHostStatus (host);
230
230
BOOST_CHECK (host->GetFlappingCurrent () == 39.1 );
231
231
BOOST_CHECK (host->IsFlapping ());
232
232
233
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
234
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
235
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
236
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
237
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
238
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
239
- host->ProcessCheckResult (MakeCheckResult (ServiceCritical));
233
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
234
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
235
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
236
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
237
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
238
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
239
+ host->ProcessCheckResult (MakeCheckResult (ServiceCritical), new UnitTestCRP () );
240
240
241
241
LogFlapping (host);
242
242
LogHostStatus (host);
0 commit comments