Copilot commented on code in PR #12972:
URL: https://github.com/apache/trafficserver/pull/12972#discussion_r2934097415


##########
tests/gold_tests/pluginTest/tsapi/test_TSHttpTxnServerAddrSet_retry.test.py:
##########
@@ -14,30 +14,30 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 '''
-Test to reproduce issue #12611 - retry fails when TSHttpTxnServerAddrSet is 
used
+Tests for TSHttpTxnServerAddrSet() retry behavior with and without cache 
enabled.
 '''
 
 import os
 from ports import get_port
 
 Test.Summary = '''
-Reproduce issue #12611: OS_DNS hook is not called again on retry when using 
TSHttpTxnServerAddrSet
+Verify TSHttpTxnServerAddrSet() retry works with and without cache enabled
 '''
 
 plugin_name = "test_TSHttpTxnServerAddrSet_retry"
 
 
-class TestIssue12611:
-    """Reproduce issue #12611: retry fails when TSHttpTxnServerAddrSet is 
used."""
+class TestServerAddrSetRetry:
+    """Verify retry behavior for TSHttpTxnServerAddrSet() with and without 
cache."""
 
-    def _configure_dns(self, tr: 'TestRun') -> 'Process':
+    def _configure_dns(self, tr: 'TestRun', name: str) -> 'Process':
         """Configure the DNS process for a TestRun."""
-        self._dns = tr.MakeDNServer("dns", default=['127.0.0.1'])
+        self._dns = tr.MakeDNServer(name, default=['127.0.0.1'])
         return self._dns
 
-    def _configure_traffic_server(self, tr: 'TestRun') -> 'Process':
+    def _configure_traffic_server(self, tr: 'TestRun', name: str, 
enable_cache: bool) -> 'Process':
         """Configure the Traffic Server process for a TestRun."""
-        self._ts = tr.MakeATSProcess("ts", enable_cache=False)
+        self._ts = tr.MakeATSProcess(name, enable_cache=enable_cache)
         ts = self._ts

Review Comment:
   `_configure_traffic_server()` is annotated to return a `Process` but has no 
return statement (returns `None` implicitly). Either return `self._ts` at the 
end or drop the return type annotation to avoid misleading type hints and 
future misuse.



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