0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

test: qapp must shutdown cli server before checking for leaked QTimer

This commit is contained in:
2025-04-09 19:57:04 +02:00
committed by wyzula-jan
parent a8adb064f5
commit d06605122e

View File

@ -27,9 +27,8 @@ def qapplication(qtbot, request, testable_qtimer_class): # pylint: disable=unus
if request.node.stash._storage.get("failed"):
print("Test failed, skipping cleanup checks")
return
# qapp = BECApplication()
# qapp.shutdown()
bec_dispatcher = bec_dispatcher_module.BECDispatcher()
bec_dispatcher.stop_cli_server()
testable_qtimer_class.check_all_stopped(qtbot)
qapp = QApplication.instance()
@ -55,6 +54,8 @@ def bec_dispatcher(threads_check): # pylint: disable=unused-argument
bec_dispatcher.disconnect_all()
# clean BEC client
bec_dispatcher.client.shutdown()
# stop the cli server
bec_dispatcher.stop_cli_server()
# reinitialize singleton for next test
bec_dispatcher_module.BECDispatcher.reset_singleton()