diff -r 63532cdadd44 -r 0d6db0a14001 persistentstorage/sql/TEST/t_sqlload.cpp --- a/persistentstorage/sql/TEST/t_sqlload.cpp Fri Jun 11 15:29:22 2010 +0300 +++ b/persistentstorage/sql/TEST/t_sqlload.cpp Tue Jul 06 16:18:30 2010 +0300 @@ -60,6 +60,9 @@ //Binary data length const TInt KBinDataLen = 2003; +//StatementMaxNumberTest() time limit in seconds. +const TInt KTestTimeLimit = 60;//seconds + /////////////////////////////////////////////////////////////////////////////////////// void DeleteTestFiles() @@ -124,8 +127,8 @@ /////////////////////////////////////////////////////////////////////////////////////// //StatementMaxNumberTest() timeouts in WDP builds. -//This function is used to check whether the time limit is reaqched or not. -TBool IsTimeLimitReached() +//This function is used return the seconds passed from the start of the test case. +TTimeIntervalSeconds ExecutionTimeSeconds() { struct TStartTime { @@ -137,7 +140,6 @@ }; static TStartTime startTime; - const TInt KTestTimeLimit = 150;//seconds TTime currTime; currTime.HomeTime(); @@ -145,7 +147,7 @@ TTimeIntervalSeconds s; TInt err = currTime.SecondsFrom(startTime.iTime, s); TEST2(err, KErrNone); - return s.Int() > KTestTimeLimit; + return s; } void CreateTestDir() @@ -614,8 +616,9 @@ if((idx % 100) == 0) { GetHomeTimeAsString(time); - TheTest.Printf(_L("=== %S: Create % 5d statements\r\n"), &time, idx + 1); - if(IsTimeLimitReached()) + TTimeIntervalSeconds s = ExecutionTimeSeconds(); + TheTest.Printf(_L("=== %S: Create % 5d statements. %d seconds.\r\n"), &time, idx + 1, s.Int()); + if(s.Int() > KTestTimeLimit) { TheTest.Printf(_L("=== %S: The time limit reached.\r\n"), &time); ++idx;//The idx-th statement is valid, the statement count is idx + 1. @@ -649,12 +652,13 @@ TEST2(err, KSqlAtRow); err = stmt[idx].Next(); TEST2(err, KSqlAtEnd); + GetHomeTimeAsString(time); + TTimeIntervalSeconds s = ExecutionTimeSeconds(); if((j % 100) == 0) { - GetHomeTimeAsString(time); - TheTest.Printf(_L("=== %S: % 5d statements processed\r\n"), &time, j + 1); + TheTest.Printf(_L("=== %S: % 5d statements processed. %d seconds.\r\n"), &time, j + 1, s.Int()); } - if(IsTimeLimitReached()) + if(s.Int() > KTestTimeLimit) { TheTest.Printf(_L("=== %S: The time limit reached.\r\n"), &time); break;