Verified Commit ea6297e2 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Fix flaky tagtest

The test didn't wait for a Monitor to be ready, so it could
happen that the event was sent by the Server before the Monitor
was ready to receive it.
parent 2356621a
...@@ -310,9 +310,8 @@ void TagTest::testDeleteRIDIsolation() ...@@ -310,9 +310,8 @@ void TagTest::testDeleteRIDIsolation()
QVERIFY(createJob->tag().isValid()); QVERIFY(createJob->tag().isValid());
} }
Akonadi::Monitor monitor; auto monitor = getTestMonitor();
monitor.setTypeMonitored(Akonadi::Monitor::Tags); QSignalSpy signalSpy(monitor.get(), &Monitor::tagRemoved);
QSignalSpy signalSpy(&monitor, &Monitor::tagRemoved);
TagDeleteJob *deleteJob = new TagDeleteJob(tag, this); TagDeleteJob *deleteJob = new TagDeleteJob(tag, this);
AKVERIFYEXEC(deleteJob); AKVERIFYEXEC(deleteJob);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment