Skip to content
Verified Commit e879ce53 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Make the server handler tests more stable

The tests were randomly failing due to the number of received change
notifications in the test was sometimes not matching the expected number.
This was because sometimes the thread with the FakeClient would race
with the main test thread by starting replaying the test scenario before
the main thread has acquired the NotificationController and installed
QSignalSpy to it. In this case the QSignalSpy would have missed the
notification.

The fix is to split the FakeClient start up - first phase is for the
FakeClient to connect to the server, then the test acquires the
NotificationController and installes QSignalSpy on it and only after
that it instructs the FakeClient to start replaying the test scenario.
parent 449ff597
Pipeline #375738 passed with stage
in 28 minutes and 44 seconds
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