Commit a3361287 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

don't wait a second, wait for signal

parent 9d1523e7
Pipeline #170167 failed with stage
in 4 minutes and 23 seconds
......@@ -12,6 +12,7 @@
#include <KConfigGroup>
#include <QCommandLineParser>
#include <QSignalSpy>
#include <QTemporaryDir>
#include <QtTestWidgets>
......@@ -161,9 +162,12 @@ void KateSessionManagerTest::deletingSessionFilesUnderRunningApp()
QVERIFY(m_manager->activeSession()->name() == QLatin1String("bar"));
const QString file = m_tempdir->path() + QLatin1String("/foo.katesession");
// wait for notification about external session list change
QSignalSpy spy(m_manager, &KateSessionManager::sessionListChanged);
QTRY_COMPARE_WITH_TIMEOUT(m_manager->sessionList().size(), 1, 1000); // that should be enough for KDirWatch to kick in
QCOMPARE(m_manager->activeSession()->name(), QLatin1String("bar"));
Supports Markdown
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