brbzull0 commented on code in PR #13075:
URL: https://github.com/apache/trafficserver/pull/13075#discussion_r3347870204
##########
tests/gold_tests/tls/ssl_multicert_loader.test.py:
##########
@@ -78,19 +78,13 @@
tr2.Processes.Default.Env = ts.Env
tr2.Processes.Default.ReturnCode = 0
-tr2reload = Test.AddTestRun("Reload config")
-tr2reload.StillRunningAfter = ts
+tr2reload = Test.AddConfigReload(ts, expect="fail",
expect_tasks=["ssl_multicert.yaml"], description="Reload config")
tr2reload.StillRunningAfter = server
-tr2reload.Processes.Default.Command = 'traffic_ctl config reload'
-tr2reload.Processes.Default.Env = ts.Env
-tr2reload.Processes.Default.ReturnCode = 0
-ts.Disk.diags_log.Content = Testers.ContainsExpression('ERROR: ', 'ERROR')
# Reload of ssl_multicert.yaml should fail, BUT the old config structure
# should be in place to successfully answer for the test domain
tr3 = Test.AddTestRun("Make request again for $sni_domain")
-# Wait for the reload to complete
-tr3.Processes.Default.StartBefore(server2,
ready=When.FileContains(ts.Disk.diags_log.Name, 'failed to load certificate ',
1))
Review Comment:
Yes. That `When.FileContains` was sort of a sync gate, it waited for the log
line before running the next curl. Now `traffic_ctl config reload -m` blocks
until the reload reaches a terminal state, so by the time tr3 runs the reload
is definitely done.
##########
tests/gold_tests/remap_yaml/remap_reload_yaml.test.py:
##########
@@ -106,15 +105,10 @@ def update_remap_yaml(path: str, lines: list) -> None:
url: http://bravo.ex:{pv_port}
'''.split("\n")))
-tr = Test.AddTestRun("remap_yaml reload, fails")
-tr.Processes.Default.Env = tm.Env
-tr.Processes.Default.Command = 'sleep 2; traffic_ctl config reload'
+tr = Test.AddConfigReload(tm, expect="fail", expect_tasks=["remap.yaml"],
delay_start=2, description="remap_yaml reload, fails")
tr = Test.AddTestRun("after first reload")
-await_config_reload = tr.Processes.Process('config_reload_failed', 'sleep 30')
-await_config_reload.Ready = When.FileContains(tm.Disk.diags_log.Name,
"configuration is invalid")
Review Comment:
This is the same as above: the `await_config_reload` was a sleep 30
placeholder. This was used because the previous reload run was fire-and-forget.
Now with the new `-m` the reload run only completes after the reload
terminates, so the next run can start the verifier client straight away. The
removed string validation is now asserted by `expect="fail"`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]