diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/shell_client_test.cpp @@ -982,11 +982,15 @@ process->setProcessEnvironment(env); process->setProcessChannelMode(QProcess::ForwardedChannels); process->setProgram(kill); + QSignalSpy processStartedSpy{process.data(), &QProcess::started}; + QVERIFY(processStartedSpy.isValid()); process->start(); - QVERIFY(process->waitForStarted()); + QVERIFY(processStartedSpy.wait()); AbstractClient *killClient = nullptr; - QVERIFY(shellClientAddedSpy.wait()); + if (shellClientAddedSpy.isEmpty()) { + QVERIFY(shellClientAddedSpy.wait()); + } killClient = shellClientAddedSpy.first().first().value(); QSignalSpy unresponsiveSpy(killClient, &AbstractClient::unresponsiveChanged); QSignalSpy killedSpy(process.data(), static_cast(&QProcess::finished));