Skip to content

Commit a6947fe

Browse files
authored
Merge pull request #829 from rhenium/ky/ssl-test-fix-test_ctx_client_session_cb_tls13_exception
ssl: fix flaky test case test_ctx_client_session_cb_tls13_exception
2 parents f4e7c4b + 210ba03 commit a6947fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/openssl/test_ssl_session.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,11 @@ def test_ctx_client_session_cb_tls13_exception
277277
omit "TLS 1.3 not supported" unless tls13_supported?
278278
omit "LibreSSL does not call session_new_cb in TLS 1.3" if libressl?
279279

280-
start_server do |port|
280+
server_proc = lambda do |ctx, ssl|
281+
readwrite_loop(ctx, ssl)
282+
rescue SystemCallError, OpenSSL::SSL::SSLError
283+
end
284+
start_server(server_proc: server_proc) do |port|
281285
ctx = OpenSSL::SSL::SSLContext.new
282286
ctx.min_version = :TLS1_3
283287
ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT

0 commit comments

Comments
 (0)