Describe the bug
In tests/test_properties.py, there is a method toggle_boolprop_from_thread that modifies a property in a background thread. The test has a potential race condition, in that there's no guarantee the thread will have finished before the property is checked to see if it changed.
To Reproduce
This shows up in pytest but only very occasionally.
Expected behaviour
The test should complete reliably, every time.
Resolution
Check the action, and the background thread it starts, have completed before checking the property. This probably requires a thread.join() in the toggle_boolprop_from_thread method, and a poll_task in the test code.
Describe the bug
In
tests/test_properties.py, there is a methodtoggle_boolprop_from_threadthat modifies a property in a background thread. The test has a potential race condition, in that there's no guarantee the thread will have finished before the property is checked to see if it changed.To Reproduce
This shows up in
pytestbut only very occasionally.Expected behaviour
The test should complete reliably, every time.
Resolution
Check the action, and the background thread it starts, have completed before checking the property. This probably requires a
thread.join()in thetoggle_boolprop_from_threadmethod, and apoll_taskin the test code.