bneradt commented on code in PR #13323:
URL: https://github.com/apache/trafficserver/pull/13323#discussion_r3470557654
##########
tests/gold_tests/pluginTest/stale_response/stale_response.test.py:
##########
@@ -137,28 +137,20 @@ def setupClient(self, tr: 'TestRun') -> None:
def verify_plugin_log(self) -> None:
"""Verify the contents of the stale_response plugin log."""
- tr = Test.AddTestRun("Verify stale_response plugin log")
- name = f'log_waiter_{TestStaleResponse._ts_counter}'
- log_waiter = tr.Processes.Process(name)
- log_waiter.Command = 'sleep 30'
+ swr_log_pattern = "stale-while-revalidate:.*stale.jpeg"
+ sie_log_pattern = "stale-if-error:.*error.jpeg"
+
+ def expect_log_entry(pattern: str, description: str) -> None:
+ Test.AddAwaitFileContainsTestRun(f"Await {description}",
self._ts.Disk.stale_responses_log.AbsPath, pattern)
+ self._ts.Disk.stale_responses_log.Content +=
Testers.ContainsExpression(pattern, f"Verify {description}")
+
if self._option_type == OptionType.FORCE_SWR:
Review Comment:
captured the await TestRun and kept ATS running before each await, plus
after the first await in the two-log-entry case.
--
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]