diff options
author | Christian Stenger <[email protected]> | 2016-02-10 10:43:31 +0100 |
---|---|---|
committer | Christian Stenger <[email protected]> | 2016-02-26 09:40:39 +0000 |
commit | a4b747307e50f20dbaa22cf5cc66199f14067d6c (patch) | |
tree | 3d5cd45a19f5c7e046bdee11ef2162fa672f80a4 /src/plugins/autotest/autotestunittests.cpp | |
parent | 25d63d8556b391bb0ded139c5702ad1592b81002 (diff) |
AutoTest: Fix flaky unit test
Since parsing and updating the tree model has been changed the
respective tests became flaky.
Change-Id: I82fcde51493bc86e2315018b21e9bacd8e8409a9
Reviewed-by: David Schulz <[email protected]>
Diffstat (limited to 'src/plugins/autotest/autotestunittests.cpp')
-rw-r--r-- | src/plugins/autotest/autotestunittests.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/autotest/autotestunittests.cpp b/src/plugins/autotest/autotestunittests.cpp index 60f931b5e0f..0ae4b4ad5ad 100644 --- a/src/plugins/autotest/autotestunittests.cpp +++ b/src/plugins/autotest/autotestunittests.cpp @@ -96,7 +96,9 @@ void AutoTestUnitTests::testCodeParser() QVERIFY(projectInfo.isValid()); QSignalSpy parserSpy(m_model->parser(), SIGNAL(parsingFinished())); + QSignalSpy modelUpdateSpy(m_model, SIGNAL(sweepingDone())); QVERIFY(parserSpy.wait(20000)); + QVERIFY(modelUpdateSpy.wait()); if (m_isQt4) expectedNamedQuickTestsCount = expectedUnnamedQuickTestsCount = 0; @@ -148,7 +150,9 @@ void AutoTestUnitTests::testCodeParserSwitchStartup() QVERIFY(projectInfo.isValid()); QSignalSpy parserSpy(m_model->parser(), SIGNAL(parsingFinished())); + QSignalSpy modelUpdateSpy(m_model, SIGNAL(sweepingDone())); QVERIFY(parserSpy.wait(20000)); + QVERIFY(modelUpdateSpy.wait()); QCOMPARE(m_model->autoTestsCount(), expectedAutoTestsCount.at(i)); QCOMPARE(m_model->namedQuickTestsCount(), @@ -198,7 +202,9 @@ void AutoTestUnitTests::testCodeParserGTest() QVERIFY(projectInfo.isValid()); QSignalSpy parserSpy(m_model->parser(), SIGNAL(parsingFinished())); + QSignalSpy modelUpdateSpy(m_model, SIGNAL(sweepingDone())); QVERIFY(parserSpy.wait(20000)); + QVERIFY(modelUpdateSpy.wait()); QCOMPARE(m_model->gtestNamesCount(), 6); |