Skip to content

Now the tests run on my Mac OS (MySQL 5.6) and Linux Box (MySQL 5.5) #40

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

Merged
merged 1 commit into from
Jun 27, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions pymysqlreplication/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,13 @@ def test_log_pos(self):

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

self.assertIsNone(self.stream.fetchone())

def test_log_pos_handles_disconnects(self):
self.stream.close()
self.stream = BinLogStreamReader(
connection_settings=self.database,
resume_stream=True
resume_stream=False,
only_events = [FormatDescriptionEvent, QueryEvent, TableMapEvent, WriteRowsEvent, XidEvent]
)

query = "CREATE TABLE test (id INT PRIMARY KEY AUTO_INCREMENT, data VARCHAR (50) NOT NULL)"
Expand All @@ -234,25 +235,18 @@ def test_log_pos_handles_disconnects(self):
self.execute(query)
self.execute("COMMIT")

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

self.assertIsInstance(self.stream.fetchone(), FormatDescriptionEvent)
self.assertGreater(self.stream.log_pos, 0)

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

self.assertIsInstance(self.stream.fetchone(), QueryEvent)
self.assertIsInstance(self.stream.fetchone(), TableMapEvent)
self.assertIsInstance(self.stream.fetchone(), WriteRowsEvent)
self.assertIsInstance(self.stream.fetchone(), XidEvent)

self.assertIsNone(self.stream.fetchone())
self.assertIsInstance(self.stream.fetchone(), RotateEvent)
self.assertIsInstance(self.stream.fetchone(), XidEvent)

self.assertIsInstance(self.stream.fetchone(), FormatDescriptionEvent)
self.assertGreater(self.stream.log_pos, 0)

#self.assertFalse(self.stream._BinLogStreamReader__connected_stream)


class TestMultipleRowBinLogStreamReader(base.PyMySQLReplicationTestCase):
def test_insert_multiple_row_event(self):
Expand Down