tests: Fix flaky reconnect test

testMultiScreen explicitly sets clients on monitors, for this to work we
need autoEnter disabled.

92952bd04a0452a45140ed9c9494279683bb80e1 set this on startup, but due to
the way we reset the compositor this needs doing multiple times if
multiple tests are run.

Change-Id: Iaad3058b3ad8a12d01b3bd8272615fcd74ea250d
Reviewed-by: David Redondo <qt@david-redondo.de>
This commit is contained in:
David Edmundson 2024-09-16 21:52:12 +01:00
parent 8b9b2dec19
commit 0e64cadb98

View File

@ -128,6 +128,8 @@ void tst_WaylandReconnect::triggerReconnect()
{
const int socketFd = wl_socket_get_fd(m_socket);
m_comp.reset(new DefaultCompositor(CoreCompositor::Default, dup(socketFd)));
m_comp->m_config.autoEnter = false;
QTest::qWait(50); //we need to spin the main loop to actually reconnect
}