datacommsserver/esockserver/test/TE_Socket/SocketTestSection1.cpp
branchRCL_3
changeset 76 576874e13a2c
parent 70 b564fb5fd78b
child 84 486e9e9c45a7
equal deleted inserted replaced
73:5ebd530e523b 76:576874e13a2c
   311 
   311 
   312 enum TVerdict CSocketTest1_7::InternalDoTestStepL( void )
   312 enum TVerdict CSocketTest1_7::InternalDoTestStepL( void )
   313 	{
   313 	{
   314 	TVerdict verdict = EPass;
   314 	TVerdict verdict = EPass;
   315 
   315 
   316 	TInt numExhaustiveSockets = iNormalTest ? KNumExhaustiveSockets : 10;
   316 	TInt numExhaustiveSockets = iNormalTest ? KNumExhaustiveSockets : 10;	
   317 	iNormalTest = EFalse; // normal test is only run once, the rest are OOM tests
   317 	iNormalTest = EFalse; // normal test is only run once, the rest are OOM tests
   318 
   318 
   319 	Logger().WriteFormat(_L("Test Purpose: Exhaustive Socket Open"));
   319 	Logger().WriteFormat(_L("Test Purpose: Exhaustive Socket Open"));
   320 
   320 
   321 	// connect to esock
   321 	// connect to esock
   383 	if (ret != KErrNone)
   383 	if (ret != KErrNone)
   384 		{
   384 		{
   385 		sockNum--;
   385 		sockNum--;
   386 		}
   386 		}
   387 	Logger().WriteFormat(_L("Created %d sockets, expected at least %d sockets"), sockNum, sockCount1);
   387 	Logger().WriteFormat(_L("Created %d sockets, expected at least %d sockets"), sockNum, sockCount1);
   388 	TESTL(sockNum >= sockCount1);
   388 	
   389 
   389 	//TESTL(sockNum >= sockCount1);
   390 	Logger().WriteFormat(_L("Freeing sockets in creation order"));
   390 	//
   391 	for (i=0; i<sockNum; i++)
   391 	//Logger().WriteFormat(_L("Freeing sockets in creation order"));
   392 		{
   392 	//for (i=0; i<sockNum; i++)
   393 		socks[i].Close();
   393 	//	{
   394 		}
   394 	//	socks[i].Close();
       
   395 	//	}
   395 
   396 
   396 #endif	// (_DEBUG) }
   397 #endif	// (_DEBUG) }
   397 
   398 
   398 	CleanupStack::PopAndDestroy(socks);
   399 	CleanupStack::PopAndDestroy(socks);
   399 
   400 
   400 	CleanupStack::Pop(&ss);
   401 	CleanupStack::Pop(&ss);
       
   402 	Logger().WriteFormat(_L("Now closing socket server session without closing %d opened sockets"), sockNum);
   401 	ss.Close();
   403 	ss.Close();
   402 	SetTestStepResult(verdict);
   404 	SetTestStepResult(verdict);
   403 	return verdict;
   405 	return verdict;
   404 	}
   406 	}
   405 
   407