Copilot commented on code in PR #3634:
URL: https://github.com/apache/thrift/pull/3634#discussion_r3566630513
##########
test/rb/integration/TestServer.rb:
##########
@@ -218,6 +223,15 @@ def secondtestString(argument)
raise 'server-type nonblocking requires transport of framed'
end
+rack_server = %w[thin puma falcon].include?(normalized_server_type)
+if rack_server && options[:transport] != 'http'
+ raise "server-type #{normalized_server_type} requires transport of http"
+elsif options[:transport] == 'http' && !rack_server
+ raise 'transport http requires server-type thin, puma, or falcon'
+elsif rack_server && !options[:domain_socket].to_s.strip.empty?
+ raise "server-type #{normalized_server_type} does not support
--domain-socket"
+end
Review Comment:
Transport validation compares `options[:transport]` without trimming
whitespace, but other parts of the script already normalize transport with
`to_s.strip`. This inconsistency can lead to confusing errors if the transport
value has leading/trailing whitespace (e.g., via shell quoting) and makes the
logic harder to reason about.
--
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]