bpo-35031: Fix test_start_tls_server_1 on FreeBSD buildbots (GH-10011) · python/cpython@f6a47f3 (original) (raw)

Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
2 2
3 3 import logging
4 4 import socket
5 +import sys
5 6 import unittest
6 7 from unittest import mock
7 8 try:
@@ -429,6 +430,12 @@ def test_start_tls_server_1(self):
429 430
430 431 server_context = test_utils.simple_server_sslcontext()
431 432 client_context = test_utils.simple_client_sslcontext()
433 +if sys.platform.startswith('freebsd'):
434 +# bpo-35031: Some FreeBSD buildbots fail to run this test
435 +# as the eof was not being received by the server if the payload
436 +# size is not big enough. This behaviour only appears if the
437 +# client is using TLS1.3.
438 +client_context.options |= ssl.OP_NO_TLSv1_3
432 439
433 440 def client(sock, addr):
434 441 sock.settimeout(self.TIMEOUT)