bneradt commented on a change in pull request #6931:
URL: https://github.com/apache/trafficserver/pull/6931#discussion_r445033310



##########
File path: tests/gold_tests/autest-site/trafficserver.test.ext
##########
@@ -281,10 +282,26 @@ def MakeATSProcess(obj, name, command='traffic_server', 
select_ports=True, enabl
     get_port(p, "manager_port")
     get_port(p, "admin_port")
 
-    if enable_tls:
-        p.Ready = When.PortsOpen([p.Variables.port, p.Variables.ssl_port])
+    if enable_cache:
+        # In records.config, the cache is enabled by default so there's nothing
+        # we have to do here to functionally enable it. However, the tests that
+        # rely upon the cache will not function correctly if ATS starts
+        # processing traffic before the cache is ready. Thus we set the
+        # wait_for_cache configuration.
+        p.Disk.records_config.update({
+            # Do not accept connections from clients until cache subsystem is
+            # operational.
+            'proxy.config.http.wait_for_cache': 1,
+        })
     else:
-        p.Ready = When.PortOpen(p.Variables.port)
+        # The user wants the cache to be disabled.
+        p.Disk.records_config.update({
+            'proxy.config.http.cache.http': 0
+        })
+
+    # The following message was added so that tests and users can know when
+    # Traffic Server is ready to both receive and optimize traffic.

Review comment:
       What you describe is more specific and true, but I was trying to keep it 
generic. I'm trying to leave this implementation open to other state 
transitions that we may find later are helpful to include too. Thus I was 
trying to communicate that Traffic Server has done everything required to 
receive connections (bound ports and called accept on them) and everything 
required for optimization (initialized the cache being one of possibly other 
things).
   
   That was my intention anyway. Think I should just keep it specific?




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


Reply via email to