|
1 // |
|
2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 // |
|
17 // |
|
18 // This contains CommDb Unit Test Cases 016.XX |
|
19 |
|
20 // EPOC includes |
|
21 #include <e32base.h> |
|
22 #include <commdb.h> |
|
23 #include <d32comm.h> |
|
24 #include <e32property.h> |
|
25 |
|
26 // Test system includes |
|
27 #include "Teststepcommdb.h" |
|
28 #include "Step_016_xx.h" |
|
29 |
|
30 ///////////////////// |
|
31 // Test step 016.01 |
|
32 ///////////////////// |
|
33 |
|
34 // constructor |
|
35 CCommDbTest016_01::CCommDbTest016_01() |
|
36 { |
|
37 // store the name of this test case |
|
38 SetTestStepName(_L("step_016_01")); |
|
39 } |
|
40 |
|
41 // destructor |
|
42 CCommDbTest016_01::~CCommDbTest016_01() |
|
43 { |
|
44 } |
|
45 |
|
46 |
|
47 TVerdict CCommDbTest016_01::doTestStepPreambleL() |
|
48 { |
|
49 openDbAndViewL(TPtrC(DIAL_OUT_ISP)); |
|
50 SetTestStepResult(EPass); return TestStepResult(); |
|
51 } |
|
52 |
|
53 |
|
54 TInt CCommDbTest016_01::executeStepL() |
|
55 { |
|
56 |
|
57 //Request a notification and then cancel it |
|
58 |
|
59 TRequestStatus status; |
|
60 |
|
61 User::LeaveIfError(iTheDb->RequestNotification( status )); |
|
62 iTheDb->CancelRequestNotification(); |
|
63 User::WaitForRequest(status); |
|
64 |
|
65 |
|
66 |
|
67 if (KErrCancel == status.Int()) |
|
68 { |
|
69 return KErrNone; |
|
70 } |
|
71 else |
|
72 { |
|
73 return KErrGeneral; |
|
74 } |
|
75 } |
|
76 |
|
77 |
|
78 |
|
79 TVerdict CCommDbTest016_01::doTestStepL( ) |
|
80 { |
|
81 INFO_PRINTF1(_L("Step 016.01 called ")); |
|
82 |
|
83 |
|
84 if ( executeStepL() == KErrNone ) |
|
85 SetTestStepResult(EPass); else |
|
86 SetTestStepResult(EFail); |
|
87 return TestStepResult(); |
|
88 } |
|
89 |
|
90 |
|
91 ///////////////////// |
|
92 // Test step 016.02 |
|
93 ///////////////////// |
|
94 |
|
95 // constructor |
|
96 CCommDbTest016_02::CCommDbTest016_02() |
|
97 { |
|
98 // store the name of this test case |
|
99 SetTestStepName(_L("step_016_02")); |
|
100 } |
|
101 |
|
102 // destructor |
|
103 CCommDbTest016_02::~CCommDbTest016_02() |
|
104 { |
|
105 } |
|
106 |
|
107 TVerdict CCommDbTest016_02::doTestStepPreambleL() |
|
108 { |
|
109 openDbAndViewL(TPtrC(DIAL_OUT_ISP)); |
|
110 SetTestStepResult(EPass); return TestStepResult(); |
|
111 } |
|
112 |
|
113 |
|
114 TInt CCommDbTest016_02::executeStepL() |
|
115 { |
|
116 TInt ret=KErrGeneral; |
|
117 |
|
118 //Generate an ECommit notification |
|
119 |
|
120 //Request notifications |
|
121 TRequestStatus event; |
|
122 iTheDb->RequestNotification(event); |
|
123 |
|
124 CDBLEAVE(iTheDb->BeginTransaction(), KErrNone); |
|
125 |
|
126 //Insert a record |
|
127 TUint32 id; |
|
128 CDBLEAVE(iTheView->InsertRecord( id ), KErrNone); |
|
129 //Write the record and commit it |
|
130 iTheView->WriteTextL(TPtrC(COMMDB_NAME),_L("My Service")); |
|
131 iTheView->WriteBoolL(TPtrC(ISP_DIAL_RESOLUTION),ETrue); |
|
132 iTheView->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT),EFalse); |
|
133 iTheView->WriteBoolL(TPtrC(ISP_PROMPT_FOR_LOGIN),ETrue); |
|
134 // iTheView->WriteTextL(TPtrC(ISP_IF_NAME),_L("ppp")); |
|
135 iTheView->WriteBoolL(TPtrC(ISP_IF_PROMPT_FOR_AUTH),ETrue); |
|
136 iTheView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER),ETrue); |
|
137 iTheView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER),ETrue); |
|
138 iTheView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER),ETrue); |
|
139 CDBLEAVE(iTheView->PutRecordChanges(), KErrNone); |
|
140 CDBLEAVE(iTheDb->CommitTransaction(), KErrNone); |
|
141 |
|
142 //Now wait for the notification event |
|
143 User::WaitForRequest(event); |
|
144 |
|
145 if ( event.Int() == RDbNotifier::ECommit ) |
|
146 ret = KErrNone; |
|
147 return ret; |
|
148 } |
|
149 |
|
150 |
|
151 |
|
152 TVerdict CCommDbTest016_02::doTestStepL( ) |
|
153 { |
|
154 INFO_PRINTF1(_L("Step 016.02 called ")); |
|
155 |
|
156 if ( executeStepL() == KErrNone ) |
|
157 SetTestStepResult(EPass); else |
|
158 SetTestStepResult(EFail); |
|
159 return TestStepResult(); |
|
160 } |
|
161 |
|
162 ///////////////////// |
|
163 // Test step 016.04 |
|
164 ///////////////////// |
|
165 |
|
166 // constructor |
|
167 CCommDbTest016_04::CCommDbTest016_04() |
|
168 { |
|
169 // store the name of this test case |
|
170 SetTestStepName(_L("step_016_04")); |
|
171 } |
|
172 |
|
173 // destructor |
|
174 CCommDbTest016_04::~CCommDbTest016_04() |
|
175 { |
|
176 } |
|
177 |
|
178 TVerdict CCommDbTest016_04::doTestStepPreambleL() |
|
179 { |
|
180 openDbAndViewL(TPtrC(DIAL_OUT_ISP)); |
|
181 SetTestStepResult(EPass); return TestStepResult(); |
|
182 } |
|
183 |
|
184 |
|
185 TInt CCommDbTest016_04::executeStepL() |
|
186 { |
|
187 TInt ret=KErrGeneral; |
|
188 |
|
189 //Generate an EUnlock notification |
|
190 |
|
191 TRequestStatus event(KRequestPending); |
|
192 iTheDb->RequestNotification(event); |
|
193 if(event!=KRequestPending) |
|
194 User::LeaveIfError(event.Int()); |
|
195 |
|
196 iTheDb->SetGlobalSettingL(TPtrC(REDIAL_ATTEMPTS), 5 ); |
|
197 |
|
198 |
|
199 //EUnlock is returned as a result of a read transaction...Calling CommitTransaction without changing any value will also trigger EUnLock |
|
200 TUint32 newvalue = 0; |
|
201 iTheDb->GetGlobalSettingL(TPtrC(REDIAL_ATTEMPTS), newvalue); |
|
202 |
|
203 User::WaitForRequest(event); |
|
204 |
|
205 INFO_PRINTF2(_L("Request for notification returned %d"),event.Int()); |
|
206 |
|
207 if ( event.Int() == RDbNotifier::EUnlock ) |
|
208 ret = KErrNone; |
|
209 |
|
210 //CleanupStack::PopAndDestroy(sched); |
|
211 |
|
212 return ret; |
|
213 } |
|
214 |
|
215 |
|
216 |
|
217 TVerdict CCommDbTest016_04::doTestStepL( ) |
|
218 { |
|
219 INFO_PRINTF1(_L("Step 016.04 called ")); |
|
220 |
|
221 |
|
222 if ( executeStepL() == KErrNone ) |
|
223 SetTestStepResult(EPass); else |
|
224 SetTestStepResult(EFail); |
|
225 return TestStepResult(); |
|
226 } |
|
227 |
|
228 |
|
229 |
|
230 ///////////////////// |
|
231 // Test step 016.05 |
|
232 ///////////////////// |
|
233 |
|
234 // constructor |
|
235 CCommDbTest016_05::CCommDbTest016_05() |
|
236 { |
|
237 // store the name of this test case |
|
238 SetTestStepName(_L("step_016_05")); |
|
239 // default to no local objects allocated |
|
240 iLocalObjects = EFalse; |
|
241 } |
|
242 |
|
243 // destructor |
|
244 CCommDbTest016_05::~CCommDbTest016_05() |
|
245 { |
|
246 } |
|
247 |
|
248 |
|
249 TVerdict CCommDbTest016_05::doTestStepPreambleL() |
|
250 { |
|
251 openDbAndViewL(TPtrC(DIAL_OUT_ISP)); |
|
252 SetTestStepResult(EPass); return TestStepResult(); |
|
253 } |
|
254 |
|
255 TInt CCommDbTest016_05::executeStepL() |
|
256 { |
|
257 TInt ret=KErrGeneral; |
|
258 |
|
259 //Generate an ERollback notification |
|
260 |
|
261 |
|
262 TRequestStatus event; |
|
263 iTheDb->RequestNotification(event); |
|
264 |
|
265 iTheDb->BeginTransaction(); |
|
266 //Insert a record |
|
267 TUint32 id; |
|
268 CDBLEAVE(iTheView->InsertRecord( id ), KErrNone); |
|
269 iTheView->WriteTextL(TPtrC(COMMDB_NAME),_L("CCommDbTest016_05 Test record")); |
|
270 iTheView->WriteBoolL(TPtrC(ISP_DIAL_RESOLUTION),ETrue); |
|
271 iTheView->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT),EFalse); |
|
272 iTheView->WriteBoolL(TPtrC(ISP_PROMPT_FOR_LOGIN),ETrue); |
|
273 // iTheView->WriteTextL(TPtrC(ISP_IF_NAME),_L("ppp")); |
|
274 iTheView->WriteBoolL(TPtrC(ISP_IF_PROMPT_FOR_AUTH),ETrue); |
|
275 iTheView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER),ETrue); |
|
276 iTheView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER),ETrue); |
|
277 iTheView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER),ETrue); |
|
278 CDBLEAVE(iTheView->PutRecordChanges(), KErrNone); |
|
279 |
|
280 iTheDb->RollbackTransaction(); |
|
281 |
|
282 //Wait for the notify event |
|
283 User::WaitForRequest(event); |
|
284 |
|
285 if ( event.Int() == RDbNotifier::ERollback ) |
|
286 ret = KErrNone; |
|
287 return ret; |
|
288 } |
|
289 |
|
290 |
|
291 |
|
292 TVerdict CCommDbTest016_05::doTestStepL( ) |
|
293 { |
|
294 INFO_PRINTF1(_L("Step 016.05 called ")); |
|
295 |
|
296 if ( executeStepL() == KErrNone ) |
|
297 SetTestStepResult(EPass); else |
|
298 SetTestStepResult(EFail); |
|
299 return TestStepResult(); |
|
300 } |
|
301 |
|
302 |
|
303 ///////////////////// |
|
304 // Test step 016.07 |
|
305 ///////////////////// |
|
306 |
|
307 // constructor |
|
308 CCommDbTest016_07::CCommDbTest016_07() |
|
309 { |
|
310 // store the name of this test case |
|
311 SetTestStepName(_L("step_016_07")); |
|
312 } |
|
313 |
|
314 // destructor |
|
315 CCommDbTest016_07::~CCommDbTest016_07() |
|
316 { |
|
317 } |
|
318 |
|
319 |
|
320 TVerdict CCommDbTest016_07::doTestStepPreambleL() |
|
321 { |
|
322 openDbAndViewL(TPtrC(DIAL_OUT_ISP)); |
|
323 SetTestStepResult(EPass); return TestStepResult(); |
|
324 } |
|
325 |
|
326 TInt CCommDbTest016_07::executeStepL() |
|
327 { |
|
328 TInt ret=KErrGeneral; |
|
329 |
|
330 //Cancel an active notification request |
|
331 |
|
332 TRequestStatus notifyStatus; |
|
333 iTheDb->RequestNotification(notifyStatus); |
|
334 |
|
335 iTheDb->BeginTransaction(); |
|
336 //Insert a record |
|
337 TUint32 id; |
|
338 CDBLEAVE(iTheView->InsertRecord( id ), KErrNone); |
|
339 iTheView->WriteTextL(TPtrC(COMMDB_NAME),_L("CCommDbTest016_05 Test record")); |
|
340 iTheView->WriteBoolL(TPtrC(ISP_DIAL_RESOLUTION),ETrue); |
|
341 iTheView->WriteBoolL(TPtrC(ISP_USE_LOGIN_SCRIPT),EFalse); |
|
342 iTheView->WriteBoolL(TPtrC(ISP_PROMPT_FOR_LOGIN),ETrue); |
|
343 // iTheView->WriteTextL(TPtrC(ISP_IF_NAME),_L("ppp")); |
|
344 iTheView->WriteBoolL(TPtrC(ISP_IF_PROMPT_FOR_AUTH),ETrue); |
|
345 iTheView->WriteBoolL(TPtrC(ISP_IP_ADDR_FROM_SERVER),ETrue); |
|
346 iTheView->WriteBoolL(TPtrC(ISP_IP_DNS_ADDR_FROM_SERVER),ETrue); |
|
347 iTheView->WriteBoolL(TPtrC(ISP_IP6_DNS_ADDR_FROM_SERVER),ETrue); |
|
348 |
|
349 CDBLEAVE(iTheView->PutRecordChanges(), KErrNone); |
|
350 |
|
351 iTheDb->CancelRequestNotification(); |
|
352 |
|
353 iTheDb->CommitTransaction(); |
|
354 |
|
355 //Wait for the notify |
|
356 User::WaitForRequest( notifyStatus ); |
|
357 |
|
358 if ( notifyStatus.Int() == KErrCancel ) |
|
359 { |
|
360 //Notify request has been cancelled |
|
361 ret = KErrNone; |
|
362 } |
|
363 |
|
364 return ret; |
|
365 } |
|
366 |
|
367 |
|
368 |
|
369 TVerdict CCommDbTest016_07::doTestStepL( ) |
|
370 { |
|
371 INFO_PRINTF1(_L("Step 016.07 called ")); |
|
372 |
|
373 if ( executeStepL() == KErrNone ) |
|
374 SetTestStepResult(EPass); else |
|
375 SetTestStepResult(EFail); |
|
376 return TestStepResult(); |
|
377 } |
|
378 |
|
379 |
|
380 ///////////////////// |
|
381 // Test step 016.08 |
|
382 ///////////////////// |
|
383 |
|
384 // constructor |
|
385 CCommDbTest016_08::CCommDbTest016_08() |
|
386 { |
|
387 // store the name of this test case |
|
388 SetTestStepName(_L("step_016_08")); |
|
389 } |
|
390 |
|
391 // destructor |
|
392 CCommDbTest016_08::~CCommDbTest016_08() |
|
393 { |
|
394 } |
|
395 |
|
396 |
|
397 TVerdict CCommDbTest016_08::doTestStepPreambleL() |
|
398 { |
|
399 openDbAndViewL(TPtrC(MODEM_BEARER)); |
|
400 SetTestStepResult(EPass); return TestStepResult(); |
|
401 } |
|
402 |
|
403 TInt CCommDbTest016_08::executeStepL() |
|
404 { |
|
405 TInt ret=KErrGeneral; |
|
406 TUint32 id; |
|
407 |
|
408 //Check that notifications are being sent to the Publish&Subscribe |
|
409 //when the Modem table is modified |
|
410 |
|
411 //set up the TSY name change event |
|
412 RProperty propCdbModemNameChange; |
|
413 TRequestStatus rqstatMdmNameChange; |
|
414 CDBLEAVE(propCdbModemNameChange.Attach(KUidSystemCategory,KUidCommDbModemTsyNameChange.iUid), KErrNone); |
|
415 CleanupClosePushL(propCdbModemNameChange); |
|
416 propCdbModemNameChange.Subscribe(rqstatMdmNameChange); |
|
417 __ASSERT_ALWAYS(rqstatMdmNameChange == KRequestPending, User::Invariant()); |
|
418 |
|
419 //set up the Modem table change event |
|
420 RProperty propCdbModemRecordChange; |
|
421 TRequestStatus rqstatMdmRecordChange; |
|
422 CDBLEAVE(propCdbModemRecordChange.Attach(KUidSystemCategory,KUidCommDbModemRecordChange.iUid), KErrNone); |
|
423 CleanupClosePushL(propCdbModemRecordChange); |
|
424 propCdbModemRecordChange.Subscribe(rqstatMdmRecordChange); |
|
425 __ASSERT_ALWAYS(rqstatMdmRecordChange == KRequestPending, User::Invariant()); |
|
426 |
|
427 |
|
428 |
|
429 //Make sure there is a record in the modem table |
|
430 CDBLEAVE( iTheView->InsertRecord( id ), KErrNone ); |
|
431 |
|
432 _LIT(KName,"CCommDbTest015_03"); |
|
433 _LIT(KTsy,"HAYES"); |
|
434 _LIT8(KModemInitString,"AT&F1"); |
|
435 _LIT8(KModemFaxInitString,"AT&d2"); |
|
436 //Write some sample data into the table |
|
437 |
|
438 iTheView->WriteTextL(TPtrC(COMMDB_NAME),KName); |
|
439 iTheView->WriteTextL(TPtrC(MODEM_TSY_NAME),KTsy); |
|
440 iTheView->WriteUintL(TPtrC(MODEM_RATE),(TUint32)EBps57600); |
|
441 iTheView->WriteUintL(TPtrC(MODEM_DATA_BITS),(TUint32)EData8); |
|
442 iTheView->WriteUintL(TPtrC(MODEM_STOP_BITS),(TUint32)EStop1); |
|
443 iTheView->WriteUintL(TPtrC(MODEM_PARITY),(TUint32)EParityNone); |
|
444 iTheView->WriteUintL(TPtrC(MODEM_HANDSHAKING),(TUint32)(KConfigObeyCTS|KConfigObeyDSR|KConfigFailDSR|KConfigObeyDCD|KConfigFailDCD)); //KConfigObeyCTS; |
|
445 iTheView->WriteUintL(TPtrC(MODEM_SPECIAL_RATE),(TUint32)0); |
|
446 iTheView->WriteUintL(TPtrC(MODEM_XON_CHAR),(TUint32)0); |
|
447 iTheView->WriteUintL(TPtrC(MODEM_XOFF_CHAR),(TUint32)0); |
|
448 iTheView->WriteTextL(TPtrC(MODEM_MODEM_INIT_STRING),KModemInitString); |
|
449 iTheView->WriteTextL(TPtrC(MODEM_DATA_INIT_STRING),KNullDesC8); |
|
450 iTheView->WriteTextL(TPtrC(MODEM_FAX_INIT_STRING),KModemFaxInitString); |
|
451 iTheView->WriteUintL(TPtrC(MODEM_SPEAKER_PREF),(TUint32)EModemSpeakerSettingAfterDialUntilAnswer); |
|
452 iTheView->WriteUintL(TPtrC(MODEM_SPEAKER_VOL_PREF),(TUint32)EModemSpeakerVolumeQuiet); |
|
453 |
|
454 CDBLEAVE( iTheView->PutRecordChanges(), KErrNone ); |
|
455 |
|
456 delete iTheView; |
|
457 iTheView = 0; |
|
458 |
|
459 |
|
460 iTheView = iTheDb->OpenTableLC( TPtrC(MODEM_BEARER)); |
|
461 CleanupStack::Pop(); |
|
462 |
|
463 |
|
464 //Now delete the modem record and check for the notifications |
|
465 CDBLEAVE( iTheView->GotoFirstRecord(), KErrNone ); |
|
466 CDBLEAVE( iTheView->DeleteRecord(), KErrNone ); |
|
467 |
|
468 User::WaitForRequest(rqstatMdmNameChange); |
|
469 User::WaitForRequest(rqstatMdmRecordChange); |
|
470 if (rqstatMdmNameChange == KErrNone && |
|
471 rqstatMdmRecordChange == KErrNone ) |
|
472 { |
|
473 ret = KErrNone; |
|
474 } |
|
475 CleanupStack::PopAndDestroy(); // rqstatMdmRecordChange |
|
476 CleanupStack::PopAndDestroy(); // rqstatMdmNameChange |
|
477 |
|
478 return ret; |
|
479 } |
|
480 |
|
481 |
|
482 |
|
483 TVerdict CCommDbTest016_08::doTestStepL( ) |
|
484 { |
|
485 INFO_PRINTF1(_L("Step 016.08 called ")); |
|
486 |
|
487 |
|
488 if ( executeStepL() == KErrNone ) |
|
489 SetTestStepResult(EPass); else |
|
490 SetTestStepResult(EFail); |
|
491 return TestStepResult(); |
|
492 } |
|
493 |
|
494 |
|
495 |
|
496 ///////////////////// |
|
497 // Test step 016.09 |
|
498 ///////////////////// |
|
499 |
|
500 // constructor |
|
501 CCommDbTest016_09::CCommDbTest016_09() |
|
502 { |
|
503 // store the name of this test case |
|
504 SetTestStepName(_L("step_016_09")); |
|
505 } |
|
506 |
|
507 // destructor |
|
508 CCommDbTest016_09::~CCommDbTest016_09() |
|
509 { |
|
510 } |
|
511 |
|
512 TVerdict CCommDbTest016_09::doTestStepL( ) |
|
513 { |
|
514 INFO_PRINTF1(_L("Step 016.09 called ")); |
|
515 |
|
516 SetTestStepResult(EPass); |
|
517 // Heap test for 016.01 |
|
518 //Commented out because it causes a DBMS server crash |
|
519 //CCommDbTest016_01* step016_01 = new(ELeave) CCommDbTest016_01; |
|
520 //CleanupStack::PushL(step016_01); |
|
521 //doTestStepWithHeapFailureL( *step016_01, KErrNone); |
|
522 //if ( step016_01->TestStepResult() == EFail ) |
|
523 //SetTestStepResult(EFail); //CleanupStack::PopAndDestroy(step016_01); |
|
524 |
|
525 // Heap test for 016.02 |
|
526 |
|
527 //Commented out because it causes a DBMS server crash |
|
528 //CCommDbTest016_02* step016_02 = new CCommDbTest016_02; |
|
529 //CleanupStack::PushL(step016_02); |
|
530 //doTestStepWithHeapFailureL( *step016_02, KErrNone); |
|
531 //if ( step016_02->TestStepResult() == EFail ) |
|
532 //SetTestStepResult(EFail); //CleanupStack::PopAndDestroy(step016_02); |
|
533 |
|
534 |
|
535 // Heap test for 016.04 |
|
536 //Commented out because it causes a DBMS server crash |
|
537 //CCommDbTest016_04* step016_04 = new(ELeave) CCommDbTest016_04; |
|
538 //CleanupStack::PushL(step016_04); |
|
539 //doTestStepWithHeapFailureL( *step016_04, KErrNone); |
|
540 //if ( step016_04->TestStepResult() == EFail ) |
|
541 //SetTestStepResult(EFail); //CleanupStack::PopAndDestroy(step016_04); |
|
542 |
|
543 |
|
544 // Heap test for 016.05 |
|
545 |
|
546 //Commented out because it causes a DBMS server crash |
|
547 //CCommDbTest016_05* step016_05 = new(ELeave) CCommDbTest016_05; |
|
548 //CleanupStack::PushL(step016_05); |
|
549 //doTestStepWithHeapFailureL( *step016_05, KErrNone); |
|
550 //if ( step016_05->TestStepResult() == EFail ) |
|
551 //SetTestStepResult(EFail); //CleanupStack::PopAndDestroy(step016_05); |
|
552 |
|
553 // Heap test for 016.07 |
|
554 |
|
555 //Commented out because it causes a DBMS server crash |
|
556 //CCommDbTest016_07* step016_07 = new(ELeave) CCommDbTest016_07; |
|
557 //CleanupStack::PushL(step016_07); |
|
558 //doTestStepWithHeapFailureL( *step016_07, KErrGeneral); |
|
559 //if ( step016_07->TestStepResult() == EFail ) |
|
560 //SetTestStepResult(EFail); //CleanupStack::PopAndDestroy(step016_07); |
|
561 |
|
562 // Heap test for 016.08 |
|
563 |
|
564 //Commented out as it causes a 'Hang' |
|
565 //CCommDbTest016_08* step016_08 = new(ELeave) CCommDbTest016_08; |
|
566 //CleanupStack::PushL(step016_08); |
|
567 //doTestStepWithHeapFailureL( *step016_08, KErrNone); |
|
568 //if ( step016_08->TestStepResult() == EFail ) |
|
569 //SetTestStepResult(EFail); //CleanupStack::PopAndDestroy(step016_08); |
|
570 |
|
571 // These OOM tests have a bad habit of generating stray signals as they are intended to fail in the middle. |
|
572 // Tidy everything up or scheduletest will set our status to "fail" :-( |
|
573 while (RThread().RequestCount() > 0) |
|
574 User::WaitForAnyRequest(); |
|
575 |
|
576 return TestStepResult(); |
|
577 |
|
578 } |
|
579 |