Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit feb1d443 authored by Martin Flöser's avatar Martin Flöser

Try to make TestShellClient::testUnresponsiveWindow more robust

When looking at the test results on we see this is the
test which fails most often and it's always at the same line of code.

So I just had a look with the thought: "what's special about this code,
why could it fail?"

Looking at it we start an external process which is supposed to connect
to KWin. We wait for the process to start and then wait for the shell
client added. This assumes that at the time we handle the wait for
started the connection of the window has not happened yet.

Waiting for the process in a blocking way, might make the process fail
to connect to the Wayland session, so this is changed to not block and
instead use a signal.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent d49642ca
......@@ -982,11 +982,15 @@ void TestShellClient::testUnresponsiveWindow()
QSignalSpy processStartedSpy{, &QProcess::started};
AbstractClient *killClient = nullptr;
if (shellClientAddedSpy.isEmpty()) {
killClient = shellClientAddedSpy.first().first().value<AbstractClient*>();
QSignalSpy unresponsiveSpy(killClient, &AbstractClient::unresponsiveChanged);
QSignalSpy killedSpy(, static_cast<void(QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::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