Skip to content

Commit 90eaeca

Browse files
committed
Skip TLS tests for macOS 12
1 parent 135318e commit 90eaeca

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

tests/test_connection.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2200,8 +2200,10 @@ def test_connection_attributes_defaults(self):
22002200
"".format(attr_name, res_dict[attr_name],
22012201
expected_attrs[attr_name]))
22022202

2203-
@unittest.skipIf(sys.version_info < (2, 7, 9), "The support for SSL is "
2204-
"not available for Python versions < 2.7.9.")
2203+
@unittest.skipIf(
2204+
sys.platform == "darwin" and platform.mac_ver()[0].startswith("12"),
2205+
"This test fails due to a bug on macOS 12",
2206+
)
22052207
@unittest.skipIf(tests.MYSQL_VERSION < (5, 7, 40), "TLSv1.1 incompatible")
22062208
@tests.foreach_cnx()
22072209
def test_get_connection_with_tls_version(self):

tests/test_mysqlx_connection.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,8 +1067,10 @@ def test_ssl_connection(self):
10671067
uri = build_uri(**dict(list(self.connect_kwargs.items()) + extra))
10681068
session = mysqlx.get_session(uri)
10691069

1070-
@unittest.skipIf(sys.version_info < (2, 7, 9), "The support for SSL is "
1071-
"not available for Python versions < 2.7.9.")
1070+
@unittest.skipIf(
1071+
sys.platform == "darwin" and platform.mac_ver()[0].startswith("12"),
1072+
"This test fails due to a bug on macOS 12",
1073+
)
10721074
@unittest.skipIf(tests.MYSQL_VERSION < (5, 7, 40), "TLSv1.1 incompatible")
10731075
def test_get_session_with_tls_version(self):
10741076
# Test None value is returned if no schema name is specified

tests/test_mysqlx_pooling.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import platform
3939
import re
4040
import socket
41+
import sys
4142

4243
from mysqlx.connection import update_timeout_penalties_by_error
4344
from mysqlx.errors import InterfaceError, OperationalError, ProgrammingError, PoolError
@@ -448,6 +449,10 @@ def test_reset_get_new_connection(self):
448449
# No errors should raise from closing client.
449450
client.close()
450451

452+
@unittest.skipIf(
453+
sys.platform == "darwin" and platform.mac_ver()[0].startswith("12"),
454+
"This test fails due to a bug on macOS 12",
455+
)
451456
@unittest.skipIf(tests.MYSQL_VERSION < (5, 7, 40), "TLSv1.1 incompatible")
452457
def test_get_client_with_tls_version(self):
453458
# Test None value is returned if no schema name is specified

0 commit comments

Comments
 (0)