This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 40b4bd5a89 h2origin.test.py: use FileContains for squid.log entry 
(#10076)
40b4bd5a89 is described below

commit 40b4bd5a89be79276fd370cf340554798d62eb07
Author: Brian Neradt <[email protected]>
AuthorDate: Mon Jul 24 10:13:26 2023 -0500

    h2origin.test.py: use FileContains for squid.log entry (#10076)
    
    h2origin.test.py used a hard-coded 10 second delay for the squid.log
    entry to be written. This changes it to use a FileContains entry which
    loops upon the existence of that file.
---
 tests/gold_tests/h2/h2origin.test.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/tests/gold_tests/h2/h2origin.test.py 
b/tests/gold_tests/h2/h2origin.test.py
index cedbc7d00b..eae341affa 100644
--- a/tests/gold_tests/h2/h2origin.test.py
+++ b/tests/gold_tests/h2/h2origin.test.py
@@ -74,12 +74,17 @@ tr.AddVerifierClientProcess("client", replay_file, 
http_ports=[ts.Variables.port
 tr.StillRunningAfter = ts
 tr.TimeOut = 60
 
-# Just a check to flush out the traffic log until we have a clean shutdown for 
traffic_server
-tr = Test.AddTestRun("Wait for the access log to write out")
-tr.DelayStart = 10
+tr = Test.AddTestRun("Wait squid.log to be written")
+timeout = 30
+watcher = tr.Processes.Process("watcher")
+watcher.Command = f"sleep {timeout}"
+watcher.Ready = When.FileContains(ts.Disk.squid_log.Name, r'14 http/1.1 
http/2')
+watcher.TimeOut = timeout
 tr.StillRunningAfter = ts
 tr.StillRunningAfter = server
-tr.Processes.Default.Command = 'ls'
+tr.TimeOut = timeout
+tr.Processes.Default.StartBefore(watcher)
+tr.Processes.Default.Command = 'echo await_squid_log'
 tr.Processes.Default.ReturnCode = 0
 
 # UUIDs 1-4 should be http/1.1 clients and H2 origin

Reply via email to