Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance Testing with MySQL8 & Update GitHub Actions #484

Prev Previous commit
Next Next commit
fix: add ignoredEvents and create_and_insert_value in TestDataTypeVer…
…sion8
  • Loading branch information
heehehe committed Sep 19, 2023
commit 5e35074281d5305b7cbdbfd6cd8be82b1eafead9
26 changes: 26 additions & 0 deletions pymysqlreplication/tests/test_data_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,32 @@ def test_mariadb_only_status_vars(self):


class TestDataTypeVersion8(base.PyMySQLReplicationPercona8TestCase):
def ignoredEvents(self):
return [GtidEvent, PreviousGtidsEvent]

def create_and_insert_value(self, create_query, insert_query):
self.execute(create_query)
self.execute(insert_query)
self.execute("COMMIT")

self.assertIsInstance(self.stream.fetchone(), RotateEvent)
self.assertIsInstance(self.stream.fetchone(), FormatDescriptionEvent)
# QueryEvent for the Create Table
self.assertIsInstance(self.stream.fetchone(), QueryEvent)

# QueryEvent for the BEGIN
self.assertIsInstance(self.stream.fetchone(), QueryEvent)

self.assertIsInstance(self.stream.fetchone(), TableMapEvent)

event = self.stream.fetchone()
if self.isMySQL56AndMore():
self.assertEqual(event.event_type, WRITE_ROWS_EVENT_V2)
else:
self.assertEqual(event.event_type, WRITE_ROWS_EVENT_V1)
self.assertIsInstance(event, WriteRowsEvent)
return event

def test_partition_id(self):
if not self.isMySQL80AndMore():
self.skipTest("Not supported in this version of MySQL")
Expand Down