188 (4) Increases the <interval> a bit so that next time round the cancel is injected at a different stage. |
188 (4) Increases the <interval> a bit so that next time round the cancel is injected at a different stage. |
189 |
189 |
190 Note that since the test is normally executed by a thread of lower priority than ESock_IP, it relies on |
190 Note that since the test is normally executed by a thread of lower priority than ESock_IP, it relies on |
191 ESock_IP yielding (otherwise it won't test different phases. |
191 ESock_IP yielding (otherwise it won't test different phases. |
192 For instance DummyMCPR will artificially yield on TCFServiceProvider::TJoinRequest. |
192 For instance DummyMCPR will artificially yield on TCFServiceProvider::TJoinRequest. |
193 NetMCPR will not normally yield as is. |
193 NetMCPR will not normally yield as is. DummyFlowFactory will yield on serving a TFindOrCreateRequest. |
194 |
194 |
195 @internalComponent |
195 @internalComponent |
196 */ |
196 */ |
197 class CStartStopCrazyLoopRConnectionStep : public CStartRConnectionStep |
197 class CStartStopCrazyLoopRConnectionStep : public CStartRConnectionStep |
198 { |
198 { |
199 public: |
199 public: |
|
200 enum { |
|
201 /* |
|
202 * The test executes a loop of starting and then stopping a connection at discrete, growing intervals. |
|
203 * It is crucial that enough iterations are executed, as otherwise the test isn't doing its job. |
|
204 * The test will fail if this is detected. As iteration gaps are time-based the test first calibrates |
|
205 * itself by running CStartStopCrazyLoopRConnectionStep::CalibrateStart to determine how |
|
206 * much time does the start take in order to chop this span further into ELoops intevals. |
|
207 * Calibration isn't uterrly precise and it can be that a connection startup executed within |
|
208 * the loop completes quicker than during calibration. It has been in fact observed |
|
209 * in the overnight builds (about 7.5%). A number of things can be done to accomdate for that. |
|
210 * The approach chosen is to: |
|
211 * (1) Plan for EPlannedLoops (chop down the CStartStopCrazyLoopRConnectionStep::CalibrateStart |
|
212 * into EPlannedLoops |
|
213 * (2) Insist on excuting at least EMandatoryLoops (the test will fail if less iterations are executed) |
|
214 * (3) Keep on iterating beyond EPlannedLoops until the snooze slides of the connection |
|
215 * startup time (the calbrated connection startup time equally might have been unrepresentativelly short) |
|
216 */ |
|
217 EPlannedLoops = 15, |
|
218 EMandatoryLoops = 14, |
|
219 }; |
|
220 |
200 CStartStopCrazyLoopRConnectionStep(CCEsockTestBase*& aEsockTest); |
221 CStartStopCrazyLoopRConnectionStep(CCEsockTestBase*& aEsockTest); |
|
222 virtual ~CStartStopCrazyLoopRConnectionStep(); |
|
223 |
201 TVerdict doSingleTestStep(); |
224 TVerdict doSingleTestStep(); |
202 TInt CalibrateStart(); |
225 TInt CalibrateStart(); |
|
226 virtual TInt doLoopStep(TInt aTimerVal); |
|
227 |
|
228 protected: |
|
229 RTimer iTimer; |
|
230 TRequestStatus* ipConnectionStartStatus; |
203 }; |
231 }; |
204 |
232 |
205 _LIT(KStartStopCrazyLoopRConnectionStep,"StartStopCrazyLoopRConnectionStep"); |
233 _LIT(KStartStopCrazyLoopRConnectionStep,"StartStopCrazyLoopRConnectionStep"); |
|
234 |
|
235 /** |
|
236 Class implementing StartCloseCrazyLoopRConnectionStep |
|
237 The test does a loop, where every iteration: |
|
238 (1) Starts the connection |
|
239 (2) Snoozes for an <interval> |
|
240 (3) Closes the connection injecting a cancel at that stage of the connection start |
|
241 (4) Increases the <interval> a bit so that next time round the cancel is injected at a different stage. |
|
242 |
|
243 Note that since the test is normally executed by a thread of lower priority than ESock_IP, it relies on |
|
244 ESock_IP yielding (otherwise it won't test different phases. |
|
245 For instance DummyMCPR will artificially yield on TCFServiceProvider::TJoinRequest. |
|
246 NetMCPR will not normally yield as is. DummyFlowFactory will yield on serving a TFindOrCreateRequest. |
|
247 |
|
248 @internalComponent |
|
249 */ |
|
250 class CStartCloseCrazyLoopRConnectionStep : public CStartStopCrazyLoopRConnectionStep |
|
251 { |
|
252 public: |
|
253 CStartCloseCrazyLoopRConnectionStep(CCEsockTestBase*& aEsockTest); |
|
254 virtual TInt doLoopStep(TInt aTimerVal); |
|
255 }; |
|
256 |
|
257 _LIT(KStartCloseCrazyLoopRConnectionStep,"StartCloseCrazyLoopRConnectionStep"); |
206 |
258 |
207 /** |
259 /** |
208 Class implementing openrconnectionStep |
260 Class implementing openrconnectionStep |
209 |
261 |
210 @internalComponent |
262 @internalComponent |