--- a/imservices/instantmessagingcache/tsrc/src/imcache_testBlocks.cpp Wed Sep 01 12:27:45 2010 +0100
+++ b/imservices/instantmessagingcache/tsrc/src/imcache_testBlocks.cpp Tue Sep 14 21:56:37 2010 +0300
@@ -273,6 +273,7 @@
{
CIMCacheFactory* instance = CIMCacheFactory::InstanceL();
TInt error = KErrNotFound;
+ iMessageFetch = 0;
MIMCacheUpdater* updater = instance->CreateUpdaterL(1, _L("testlm123@gmail.com") ,ETrue);
// tow message appended hence counter will be two.
updater->AppendReceiveMessageL( _L("testui123@gmail.com"),_L("hello this is test first message appended") ) ;
@@ -280,10 +281,10 @@
updater->RegisterObserverL(*this);
- if( !iWait.IsStarted() )
+ /* if( !iWait.IsStarted() )
{
iWait.Start();
- }
+ }*/
updater->StartNewConversationL( _L("testui123@gmail.com") ) ;
@@ -415,11 +416,22 @@
TInt Cimcache_test::ConversationUnExistTestL(CStifItemParser& /*aItem*/)
{
CIMCacheFactory* instance = CIMCacheFactory::InstanceL();
-
+ MIMCacheUpdater* updater = instance->CreateUpdaterL(1, _L("testlm123@gmail.com"), ETrue );
+ updater->RegisterObserverL(*this);
+
+ updater->StartNewConversationL( _L("testui123@gmail.com") ) ;
+
+ if( !iWait.IsStarted() )
+ {
+ iWait.Start();
+ }
+
+ updater->CloseAllConversationL();
+
MIMCacheAccessor* accessor = instance->CreateAccessorL(1, _L("testlm123@gmail.com") );
// not yest conversation open so must be EFalse here
TBool ret = accessor->IsConversationExistL(_L("testui123@gmail.com") );
-
+ updater->UnRegisterObserver(*this);
CIMCacheFactory::Release();
if(!ret)
@@ -617,7 +629,7 @@
case EIMCacheNewMessage :
{
iMessageFetch++;
- if( iWait.IsStarted() && iMessageFetch == 2 )
+ if( iWait.IsStarted() /*&& iMessageFetch == 2 */)
{
iWait.AsyncStop();
}