@@ -305,7 +305,10 @@ func (suite *MigratorTestSuite) TeardownSuite() {
305
305
func (suite * MigratorTestSuite ) SetupTest () {
306
306
ctx := context .Background ()
307
307
308
- _ , err := suite .db .ExecContext (ctx , "CREATE DATABASE test" )
308
+ _ , err := suite .db .ExecContext (ctx , "SET @@GLOBAL.binlog_transaction_dependency_tracking = WRITESET" )
309
+ suite .Require ().NoError (err )
310
+
311
+ _ , err = suite .db .ExecContext (ctx , "CREATE DATABASE test" )
309
312
suite .Require ().NoError (err )
310
313
}
311
314
@@ -322,6 +325,9 @@ func (suite *MigratorTestSuite) TestFoo() {
322
325
_ , err := suite .db .ExecContext (ctx , "CREATE TABLE test.testing (id INT PRIMARY KEY, name VARCHAR(64))" )
323
326
suite .Require ().NoError (err )
324
327
328
+ _ , err = suite .db .ExecContext (ctx , "INSERT INTO test.testing(id, name) VALUES (1, 'mona')" )
329
+ suite .Require ().NoError (err )
330
+
325
331
connectionConfig , err := GetConnectionConfig (ctx , suite .mysqlContainer )
326
332
suite .Require ().NoError (err )
327
333
@@ -330,18 +336,20 @@ func (suite *MigratorTestSuite) TestFoo() {
330
336
migrationContext .ApplierConnectionConfig = connectionConfig
331
337
migrationContext .InspectorConnectionConfig = connectionConfig
332
338
migrationContext .DatabaseName = "test"
333
- migrationContext .SkipPortValidation = true
334
339
migrationContext .OriginalTableName = "testing"
335
340
migrationContext .SetConnectionConfig ("innodb" )
336
- migrationContext .AlterStatementOptions = "ADD COLUMN foobar varchar(255), ENGINE=InnoDB "
341
+ migrationContext .AlterStatementOptions = "ADD COLUMN foobar varchar(255)"
337
342
migrationContext .ReplicaServerId = 99999
338
343
migrationContext .HeartbeatIntervalMilliseconds = 100
339
344
migrationContext .ThrottleHTTPIntervalMillis = 100
340
- migrationContext .ThrottleHTTPTimeoutMillis = 1000
345
+ migrationContext .DMLBatchSize = 10
346
+ migrationContext .NumWorkers = 4
347
+ migrationContext .SkipPortValidation = true
341
348
342
349
//nolint:dogsled
343
350
_ , filename , _ , _ := runtime .Caller (0 )
344
351
migrationContext .ServeSocketFile = filepath .Join (filepath .Dir (filename ), "../../tmp/gh-ost.sock" )
352
+ _ = os .Remove (filename )
345
353
346
354
migrator := NewMigrator (migrationContext , "0.0.0" )
347
355
0 commit comments