Commit d788d4e2 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

kns: Show information on why the test is failing

Which streams are holding us up?
parent 3d74a43a
......@@ -55,7 +55,12 @@ QVector<AbstractResource*> KNSBackendTest::getResources(ResultsStream* stream, b
resources += res;
Q_EMIT stream->fetchMore();
});
Q_ASSERT(spyResources.wait(10000));
bool waited = spyResources.wait(10000);
if (!waited) {
if (auto x = qobject_cast<AggregatedResultsStream*>(stream))
qDebug() << "waited" << x->streams();
}
Q_ASSERT(waited);
Q_ASSERT(!resources.isEmpty() || canBeEmpty);
return resources;
}
......
......@@ -23,6 +23,8 @@ public:
AggregatedResultsStream(const QSet<ResultsStream*>& streams);
~AggregatedResultsStream();
QSet<QObject*> streams() const { return m_streams; }
Q_SIGNALS:
void finished();
......
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