Skip to content

Commit a1ca6c5

Browse files
Give the TLS fork test its own port
memcached_ssl_persistent's default random port range is shared with tests that start memcached without TLS, and a persistent server already on the port is reused, so the test could occasionally get a non-TLS server. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 20bb37e commit a1ca6c5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎test/integration/test_fork_safety.rb‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@
8787
# Closing the TLS socket in the child would send close_notify on the
8888
# session the parent is still using.
8989
it 'leaves the parent TLS session usable after a forked child closes the client' do
90-
memcached_ssl_persistent(protocol) do |dc, _port|
90+
# A fixed port: the helper's default random range is shared with
91+
# tests that start memcached without TLS
92+
memcached_ssl_persistent(protocol, 21_951) do |dc, _port|
9193
dc.set('tls_fork_key', 'parent_value')
9294
server = dc.instance_variable_get(:@ring).servers.first
9395
parent_sock = server.sock

0 commit comments

Comments
 (0)