Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Aug 22, 2024
1 parent 10f116f commit 9892f60
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cymysql/tests/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,14 @@ def test_issue_36(self):
# now nuke the connection
try:
conn.kill(kill_id)
except cymysql.InternalError: # MySQL 9.0
except cymysql.InternalError:
exc, value, tb = sys.exc_info()
self.assertEqual(value.errno, 1047)
self.assertEqual(value.errmsg, 'Unknown command')
# MySQL 8.0
if value.error == 1317:
self.assertEqual(value.errmsg, 'Query execution was interrupted'')
# MySQL 9.0
elif value.error == 1047:
self.assertEqual(value.errmsg, 'Unknown command')
return
# make sure this connection has broken
try:
Expand Down

0 comments on commit 9892f60

Please sign in to comment.