loggingservices/eventlogger/test/src/t_logservercrash.cpp
branchRCL_3
changeset 6 5ffdb8f2067f
parent 0 08ec8eefde2f
child 9 667e88a979d7
equal deleted inserted replaced
2:6862383cf555 6:5ffdb8f2067f
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 // T_LOGSERVCRASH.CPP
    14 // T_LOGSERVCRASH.CPP
    15 // This tests the fix implemented for DEF047320
    15 // This tests the fix implemented for DEF047320
    16 // 
    16 // 
       
    17 // If this test starts failing, then go and check the CentralRepository private data cage 
       
    18 // (c:\\private\\10202be9 or z:\\private\\10202be9) if 101f401d.txt file is there.
       
    19 // If it is then delete it and try the test again.
       
    20 // (The problem is that if there is an existing 101f401d.txt file, then the contact match count value
       
    21 // will be loaded from that file, not from the LogEng resource file)
    17 //
    22 //
    18 
    23 
    19 #include <s32file.h>
    24 #include <s32file.h>
    20 #include <e32math.h>
    25 #include <e32math.h>
    21 
    26 
   133 		User::After(Math::Random() % 100000);
   138 		User::After(Math::Random() % 100000);
   134 		active->StartL();
   139 		active->StartL();
   135 		aClient.ChangeEvent(*event, active->iStatus);
   140 		aClient.ChangeEvent(*event, active->iStatus);
   136 		CActiveScheduler::Start();
   141 		CActiveScheduler::Start();
   137 
   142 
       
   143 		//If the test fails on the next line with -1 or -12 error, it is possible that the contacts database is missing:
       
   144 		//c:\private\10003a73\SQLite__Contacts.cdb. Copy it to the specified location and rerun the test.
   138 		TEST2(active->iStatus.Int(), KErrNone);
   145 		TEST2(active->iStatus.Int(), KErrNone);
   139 		TEST(event->EventType() == KLogCallEventTypeUid);
   146 		TEST(event->EventType() == KLogCallEventTypeUid);
   140 		TEST(event->RemoteParty() == KTestRemoteParty1);
   147 		TEST(event->RemoteParty() == KTestRemoteParty1);
   141 		TEST(event->Direction() == KTestDirection1);
   148 		TEST(event->Direction() == KTestDirection1);
   142 		TEST(event->DurationType() == KTestDurationType1);
   149 		TEST(event->DurationType() == KTestDurationType1);
   153 			}
   160 			}
   154 		else
   161 		else
   155 			{
   162 			{
   156 			eventFlags=KTestFlags1;
   163 			eventFlags=KTestFlags1;
   157 			}
   164 			}
       
   165 		//If the test fails on the next line, it is quite possible that there is a
       
   166 		//z:\private\10202be9a\101f401d.txt file that sets the contacts match count to 0.
       
   167 		//Delete the file and run the test again.
   158 		TEST(event->Flags() == eventFlags);
   168 		TEST(event->Flags() == eventFlags);
   159 		TEST(event->Contact()==(TLogContactItemId) count+1);
   169 		TEST(event->Contact()==(TLogContactItemId) count+1);
   160 
   170 
   161 		CleanupStack::PopAndDestroy(); // event;
   171 		CleanupStack::PopAndDestroy(); // event;
   162 
   172