Skip to content

Commit

Permalink
[qtcontacts-sqlite] Fix aggregation test. Contributes to MER#1853
Browse files Browse the repository at this point in the history
If the database has been left dirty by some other test, this test will
fail. So, cleanup the DB before running this test.
  • Loading branch information
mardy committed Nov 15, 2017
1 parent e411353 commit 106e505
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/auto/aggregation/tst_aggregation.cpp
Expand Up @@ -155,6 +155,12 @@ tst_Aggregation::~tst_Aggregation()
void tst_Aggregation::initTestCase()
{
registerIdType();

/* Make sure the DB is empty */
QContactDetailFilter allSyncTargets;
setFilterDetail<QContactSyncTarget>(allSyncTargets, QContactSyncTarget::FieldSyncTarget);
m_cm->removeContacts(m_cm->contactIds(allSyncTargets));
waitForSignalPropagation();
}

void tst_Aggregation::init()
Expand Down

0 comments on commit 106e505

Please sign in to comment.