Skip to content

Commit 7097eae

Browse files
committed
BUG24413090: Fix test_cmd_refresh test when using recent MySQL servers
The test_cmd_refresh test was failing when using MySQL server versions above 5.7.10, because as of MySQL 5.7.11, the mysql_refresh() is deprecated. The test is skipped for versions above 5.7.10.
1 parent 6b2976e commit 7097eae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_abstracts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from decimal import Decimal
2828
from operator import attrgetter
2929

30+
import unittest
3031
import tests
3132
from tests import PY2, foreach_cnx
3233

@@ -185,6 +186,8 @@ def test_reset_session(self):
185186
row = self.cnx.info_query("SELECT @@session.{0}".format(key))
186187
self.assertEqual(value, row[0])
187188

189+
@unittest.skipIf(tests.MYSQL_VERSION > (5, 7, 10),
190+
"As of MySQL 5.7.11, mysql_refresh() is deprecated")
188191
@foreach_cnx()
189192
def test_cmd_refresh(self):
190193
refresh = RefreshOption.LOG | RefreshOption.THREADS

0 commit comments

Comments
 (0)