traeak commented on code in PR #13843:
URL: https://github.com/apache/trafficserver/pull/13843#discussion_r4288045617


##########
tests/gold_tests/pluginTest/stats_over_http/stats_over_http.test.py:
##########
@@ -415,3 +415,84 @@ def run(self):
 
 
 StatsOverHttpPluginTest().run()
+
+
+class StatsOverHttpCacheTtlTest:
+    """Verify that --cache-ttl serves a cached response until it goes stale."""
+
+    CACHE_TTL = 3
+
+    def __init__(self):
+        self.ts = Test.MakeATSProcess("ts_cache_ttl")
+        self.ts.Disk.plugin_config.AddLine(f'stats_over_http.so 
--cache-ttl={self.CACHE_TTL} _stats')
+        self.ts.Disk.records_config.update(
+            {
+                "proxy.config.diags.debug.enabled": 1,
+                "proxy.config.diags.debug.tags": "stats_over_http",
+            })
+        self.url = f'http://127.0.0.1:{self.ts.Variables.port}/_stats'

Review Comment:
   MakeATSProcess already sets server_ports to Variables.port



-- 
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]

Reply via email to