Skip to content

Commit 4944fdb

Browse files
committed
Use AddAwaitFileContainsTestRun
1 parent bf5cafc commit 4944fdb

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

tests/gold_tests/pluginTest/jax_fingerprint/jax_fingerprint.test.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ def __init__(
9595
self._configure_server(tr)
9696
self._configure_trafficserver()
9797
self._configure_client(tr)
98-
self._await_log()
98+
Test.AddAwaitFileContainsTestRun(
99+
f'Await jax_fingerprint.log for: {self._name}', self._ts.Disk.jax_log.AbsPath, self._method)
99100

100101
# ------------------------------------------------------------------
101102
# Helpers
@@ -272,16 +273,6 @@ def _configure_client(self, tr: 'TestRun') -> None:
272273
p.StartBefore(self._ts)
273274
tr.StillRunningAfter = self._ts
274275

275-
def _await_log(self) -> None:
276-
'''Wait for at least one fingerprint entry to appear in the log.'''
277-
tr = Test.AddTestRun(f'Await jax_fingerprint.log for: {self._name}')
278-
log_path = self._ts.Disk.jax_log.AbsPath
279-
waiter = tr.Processes.Process('waiter', 'sleep 30')
280-
waiter.Ready = When.FileContains(log_path, self._method)
281-
p = tr.Processes.Default
282-
p.Command = f'echo await {log_path}'
283-
p.StartBefore(waiter)
284-
285276

286277
# ======================================================================
287278
# Test instances

0 commit comments

Comments
 (0)