ywkaras commented on a change in pull request #6699: URL: https://github.com/apache/trafficserver/pull/6699#discussion_r415939863
########## File path: tests/gold_tests/tls/tls_client_cert.test.py ########## @@ -293,3 +306,21 @@ def done_reload(process, hasRunFor, **kw): tr4fail.Processes.Default.Command = 'curl -H host:example.com http://127.0.0.1:{0}/case2'.format(ts.Variables.port) tr4fail.Processes.Default.ReturnCode = 0 tr4fail.Processes.Default.Streams.stdout = Testers.ContainsExpression("Could Not Connect", "Check response") + +# Parking this as a ready tester on a meaningless process +# Stall the test runs until the squid.log file has appeared +def access_log_ready(tsenv): + def done_access_log(process, hasRunFor, **kw): + cmd = "test -f {0}".format(ts.Disk.squid_log) + retval = subprocess.run(cmd, shell=True, env=tsenv) + return retval.returncode == 0 + + return done_access_log + +tr = Test.AddTestRun("Wait for the access log to write out") +tr.Processes.Default.StartBefore(server4, ready=access_log_ready(ts.Env)) +tr.StillRunningAfter = ts +tr.Processes.Default.Command = 'ls' Review comment: Hmm seems questionable that creating a directory entry and writing the file would be a single atomic filesystem op. But, since this is Python, I suppose the delay between seeing the file exists and actually reading it should be sufficient for the writing to be complete. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
