Skip to content
Snippets Groups Projects
Commit 81723f2b authored by Pierre Lamot's avatar Pierre Lamot Committed by Steve Lhomme
Browse files

qt: remove explicit timeout in test_ml_model

Our CI tend to run tests extremely slowly when heavy loaded. Qt tests will
timeout by themselves after a global timeout and exit gracefully. As these
checks are not supposed to timeout we can just remove the explicit timeout with
no penalty for the case where the test runs under normal conditions.

fix: #29077
parent 42634b74
No related branches found
No related tags found
1 merge request!7038qt: remove explicit timeout in test_ml_model
Pipeline #578085 passed with stages
in 32 minutes and 30 seconds
......@@ -175,10 +175,8 @@ private slots:
const int high = 300;
m_model->appendRange(low, high);
const int timeout = 1000;
// let loading complete, getIndexFromID won't work for 'loading' model
QVERIFY(QTest::qWaitFor([this] () { return !m_model->loading(); }, timeout));
QVERIFY(QTest::qWaitFor([this] () { return !m_model->loading(); }));
std::optional<int> row = -1;
auto cb = [&row](std::optional<int> index)
......@@ -190,7 +188,7 @@ private slots:
m_model->getIndexFromId2(MLItemId{high, VLC_ML_PARENT_UNKNOWN}, cb);
// NOTE: CI fails with QTRY_COMPARE_WITH_TIMEOUT
QVERIFY(QTest::qWaitFor([&row]() { return row != -1; }, timeout));
QVERIFY(QTest::qWaitFor([&row]() { return row != -1; }));
QCOMPARE(row, high - 1);
// above we must have loaded all the data, following this we should not need to wait for results
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment