tst_QFile: remove the timer in unixPipe and socketPair

We were basically timing the qSleep, which is pointless. We don't need
to verify that qSleep(X) spends at least X time. Because it also
doesn't. Somehow, QNX can execute 1000 ms sleeps in 996 ms.

Amends commit 30e5ff3ff223d665fbed3baf2d08ad3fcf2b8455.

Change-Id: I46b5dede27114be29724fffd176a66c1799075b7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 7d0431bb8bb32606e416fbdb67fe7d3d20fc9d8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Thiago Macieira 2023-06-20 08:13:11 -07:00 committed by Qt Cherry-pick Bot
parent 9529e3e13e
commit 59a826e9a6

View File

@ -2636,8 +2636,6 @@ static void unixPipe_helper(int pipes[2])
qt_safe_write(fd, &c, 1);
}));
QElapsedTimer timer;
timer.start();
thr->start();
// synchronize with the thread having started
@ -2659,8 +2657,6 @@ static void unixPipe_helper(int pipes[2])
c = 0;
QCOMPARE(f.read(&c, 1), 1);
QCOMPARE(c, '\2');
const int elapsed = timer.elapsed();
QCOMPARE_GE(elapsed, Timeout);
thr->wait();
}