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