mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 13:33:07 +01:00
Fixed bug #24 : QA could hung when starting trace session
This commit is contained in:
parent
07f6218ea0
commit
79348425b5
@ -1265,10 +1265,13 @@ def trace_thread(act: Action, b: Barrier, cfg: List[str], output: List[str], kee
|
||||
role: User role
|
||||
stop: Event used to stop the trace thread
|
||||
"""
|
||||
connected = False
|
||||
try:
|
||||
with act.connect_server(encoding=encoding, encoding_errors=encoding_errors,
|
||||
user=user, password=password) as srv:
|
||||
output.append(srv.trace.start(config='\n'.join(cfg)))
|
||||
b.wait()
|
||||
connected = True
|
||||
while not stop.is_set():
|
||||
line = srv.readline_timed(1)
|
||||
if line is not TIMEOUT:
|
||||
@ -1276,6 +1279,10 @@ def trace_thread(act: Action, b: Barrier, cfg: List[str], output: List[str], kee
|
||||
stop.set()
|
||||
elif keep_log:
|
||||
output.append(line)
|
||||
except:
|
||||
if not connected:
|
||||
b.wait()
|
||||
raise
|
||||
|
||||
class TraceSession:
|
||||
"""Object to manage Firebird trace session.
|
||||
|
Loading…
Reference in New Issue
Block a user