[autotests] Try to make PlasmaWindowTest::testCreateDestroyX11PlasmaWindow more robust
The test was racing on build.kde.org and failing due to that. We have a condition there where we wait for some parts being transmitted through X and some through Wayland. The test assumed X is faster and failed due to that.
This commit is contained in:
parent
c29d6093ba
commit
f5f14475b5
1 changed files with 7 additions and 6 deletions
|
@ -146,12 +146,13 @@ void PlasmaWindowTest::testCreateDestroyX11PlasmaWindow()
|
|||
QVERIFY(client->isDecorated());
|
||||
QVERIFY(client->isActive());
|
||||
// verify that it gets the keyboard focus
|
||||
QVERIFY(!client->surface());
|
||||
// we don't have a surface yet, so focused keyboard surface if set is not ours
|
||||
QVERIFY(!waylandServer()->seat()->focusedKeyboardSurface());
|
||||
QSignalSpy surfaceChangedSpy(client, &Toplevel::surfaceChanged);
|
||||
QVERIFY(surfaceChangedSpy.isValid());
|
||||
QVERIFY(surfaceChangedSpy.wait());
|
||||
if (!client->surface()) {
|
||||
// we don't have a surface yet, so focused keyboard surface if set is not ours
|
||||
QVERIFY(!waylandServer()->seat()->focusedKeyboardSurface());
|
||||
QSignalSpy surfaceChangedSpy(client, &Toplevel::surfaceChanged);
|
||||
QVERIFY(surfaceChangedSpy.isValid());
|
||||
QVERIFY(surfaceChangedSpy.wait());
|
||||
}
|
||||
QVERIFY(client->surface());
|
||||
QCOMPARE(waylandServer()->seat()->focusedKeyboardSurface(), client->surface());
|
||||
|
||||
|
|
Loading…
Reference in a new issue