From 6c71403281b26a3707c821b6f9f18143534ecfc4 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Sat, 17 Nov 2018 12:06:35 +0000 Subject: [PATCH] [autotests] Hopefully stabilise TestShellClient Summary: Apparently this test is flaky, based on the output I recieved we had processed the un-fullscreen but not the un-maximise. It seems possible the wayland thread could process when there's only one request in the queue. Test Plan: Couldn't reproduce the original issue, it's a blind patch but the current tests still pass. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16955 --- autotests/integration/shell_client_test.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp index b14ba07ac3..6e75cf8ffc 100644 --- a/autotests/integration/shell_client_test.cpp +++ b/autotests/integration/shell_client_test.cpp @@ -730,7 +730,10 @@ void TestShellClient::testMaximizedToFullscreen() QVERIFY(fullscreenChangedSpy.wait()); if (decoMode == ServerSideDecoration::Mode::Server) { QVERIFY(sizeChangeRequestedSpy.wait()); - // don't check count, XDG might legitimately get two updates + // XDG will legitimately get two updates. They might be batched + if (xdgShellSurface && sizeChangeRequestedSpy.count() == 1) { + QVERIFY(sizeChangeRequestedSpy.wait()); + } // fails as we don't correctly call setMaximize(false) // but realistically the only toolkits that support the deco also use XDGShell