Skip to content

Commit

Permalink
[tests] Fix SessionHandlerTest init/cleanup
Browse files Browse the repository at this point in the history
Failure to remove temporary DB file causes
SessionHandlerTest::testClientAuthMD5WithoutNonce3(),
SessionHandlerTest.cpp:1063 to fail on second (and following) test execution.

Introduced by d9234ca

Relates NEMO#664
  • Loading branch information
martyone committed May 22, 2013
1 parent 72fffd2 commit e4460e8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests_meego/SessionHandlerTest.cpp
Expand Up @@ -43,6 +43,7 @@
#include "TestUtils.h"
#include "ServerAlertedNotification.h"
#include "SyncAgentConfigProperties.h"
#include "SyncCommonDefs.h"

#include "TestLoader.h"

Expand Down Expand Up @@ -83,12 +84,16 @@ void SessionHandlerTest::releaseStorage( StoragePlugin* aStorage )

void SessionHandlerTest::init()
{
QFile::remove( DBFILE );
// See DataSync::DatabaseHandler::DatabaseHandler()
QString effectivePath = Sync::syncCacheDir() + QDir::separator() + DBFILE;
QFile::remove( effectivePath );
}

void SessionHandlerTest::cleanup()
{
QFile::remove( DBFILE );
// See DataSync::DatabaseHandler::DatabaseHandler()
QString effectivePath = Sync::syncCacheDir() + QDir::separator() + DBFILE;
QFile::remove( effectivePath );
}

void SessionHandlerTest::testClientWithClientInitiated()
Expand Down

0 comments on commit e4460e8

Please sign in to comment.