6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00

Fixed bug #23 : QA could hung when stopping trace session

This commit is contained in:
Vlad Khorsun 2024-06-13 16:54:39 +03:00
parent 07f6218ea0
commit 77848193e4

View File

@ -1340,12 +1340,10 @@ class TraceSession:
def __exit__(self, exc_type, exc_value, traceback) -> None: def __exit__(self, exc_type, exc_value, traceback) -> None:
time.sleep(2) time.sleep(2)
session = self.output.pop(0) session = self.output.pop(0)
with self.act.connect_server() as srv: self.stop_event.set()
srv.trace.stop(session_id=session) self.trace_thread.join(5.0)
self.stop_event.set() if self.trace_thread.is_alive():
self.trace_thread.join(5.0) pytest.fail('Trace thread still alive')
if self.trace_thread.is_alive():
pytest.fail('Trace thread still alive')
self.act.trace_log = self.output self.act.trace_log = self.output
class ServerKeeper: class ServerKeeper: