@@ -60,9 +60,9 @@ def test_reading_rotate_event(self):
60
60
61
61
def test_connection_stream_lost_event (self ):
62
62
self .stream .close ()
63
- self .stream = BinLogStreamReader (connection_settings = self . database ,
64
- blocking = True ,
65
- ignored_events = self .ignoredEvents ())
63
+ self .stream = BinLogStreamReader (
64
+ self . database , server_id = 1024 , blocking = True ,
65
+ ignored_events = self .ignoredEvents ())
66
66
67
67
query = "CREATE TABLE test (id INT NOT NULL AUTO_INCREMENT, data VARCHAR (50) NOT NULL, PRIMARY KEY (id))"
68
68
self .execute (query )
@@ -86,8 +86,8 @@ def test_connection_stream_lost_event(self):
86
86
87
87
def test_filtering_events (self ):
88
88
self .stream .close ()
89
- self .stream = BinLogStreamReader (connection_settings = self . database ,
90
- only_events = [QueryEvent ])
89
+ self .stream = BinLogStreamReader (
90
+ self . database , server_id = 1024 , only_events = [QueryEvent ])
91
91
query = "CREATE TABLE test (id INT NOT NULL AUTO_INCREMENT, data VARCHAR (50) NOT NULL, PRIMARY KEY (id))"
92
92
self .execute (query )
93
93
@@ -203,7 +203,8 @@ def test_log_pos(self):
203
203
if self .stream is not None :
204
204
self .stream .close ()
205
205
self .stream = BinLogStreamReader (
206
- connection_settings = self .database ,
206
+ self .database ,
207
+ server_id = 1024 ,
207
208
resume_stream = True ,
208
209
log_file = log_file ,
209
210
log_pos = log_pos ,
@@ -223,7 +224,8 @@ def test_log_pos(self):
223
224
def test_log_pos_handles_disconnects (self ):
224
225
self .stream .close ()
225
226
self .stream = BinLogStreamReader (
226
- connection_settings = self .database ,
227
+ self .database ,
228
+ server_id = 1024 ,
227
229
resume_stream = False ,
228
230
only_events = [FormatDescriptionEvent , QueryEvent , TableMapEvent , WriteRowsEvent , XidEvent ]
229
231
)
@@ -363,9 +365,8 @@ def test_read_query_event(self):
363
365
gtid = self .execute (query ).fetchone ()[0 ]
364
366
365
367
self .stream .close ()
366
- self .stream = BinLogStreamReader (connection_settings = self .database ,
367
- blocking = True ,
368
- auto_position = gtid )
368
+ self .stream = BinLogStreamReader (
369
+ self .database , server_id = 1024 , blocking = True , auto_position = gtid )
369
370
370
371
self .assertIsInstance (self .stream .fetchone (), RotateEvent )
371
372
self .assertIsInstance (self .stream .fetchone (), FormatDescriptionEvent )
@@ -420,9 +421,8 @@ def test_position_gtid(self):
420
421
gtid = self .execute (query ).fetchone ()[0 ]
421
422
422
423
self .stream .close ()
423
- self .stream = BinLogStreamReader (connection_settings = self .database ,
424
- blocking = True ,
425
- auto_position = gtid )
424
+ self .stream = BinLogStreamReader (
425
+ self .database , server_id = 1024 , blocking = True , auto_position = gtid )
426
426
427
427
self .assertIsInstance (self .stream .fetchone (), RotateEvent )
428
428
self .assertIsInstance (self .stream .fetchone (), FormatDescriptionEvent )
0 commit comments