@@ -10,10 +10,11 @@ import (
10
10
"testing"
11
11
"time"
12
12
13
- "github.com/go-mysql-org/go-mysql/client"
14
- "github.com/go-mysql-org/go-mysql/mysql"
15
13
. "github.com/pingcap/check"
16
14
uuid "github.com/satori/go.uuid"
15
+
16
+ "github.com/go-mysql-org/go-mysql/client"
17
+ "github.com/go-mysql-org/go-mysql/mysql"
17
18
)
18
19
19
20
// Use docker mysql to test, mysql is 3306, mariadb is 3316
@@ -37,7 +38,6 @@ type testSyncerSuite struct {
37
38
var _ = Suite (& testSyncerSuite {})
38
39
39
40
func (t * testSyncerSuite ) SetUpSuite (c * C ) {
40
-
41
41
}
42
42
43
43
func (t * testSyncerSuite ) TearDownSuite (c * C ) {
@@ -274,8 +274,8 @@ func (t *testSyncerSuite) setupTest(c *C, flavor string) {
274
274
c .Skip (err .Error ())
275
275
}
276
276
277
- // _, err = t.c.Execute("CREATE DATABASE IF NOT EXISTS test")
278
- // c.Assert(err, IsNil)
277
+ _ , err = t .c .Execute ("CREATE DATABASE IF NOT EXISTS test" )
278
+ c .Assert (err , IsNil )
279
279
280
280
_ , err = t .c .Execute ("USE test" )
281
281
c .Assert (err , IsNil )
@@ -307,6 +307,12 @@ func (t *testSyncerSuite) testPositionSync(c *C) {
307
307
s , err := t .b .StartSync (mysql.Position {Name : binFile , Pos : uint32 (binPos )})
308
308
c .Assert (err , IsNil )
309
309
310
+ // check we have set Slave_UUID
311
+ r , err = t .c .Execute ("SHOW SLAVE HOSTS" )
312
+ c .Assert (err , IsNil )
313
+ slaveUUID , _ := r .GetString (0 , 4 )
314
+ c .Assert (slaveUUID , HasLen , 36 )
315
+
310
316
// Test re-sync.
311
317
time .Sleep (100 * time .Millisecond )
312
318
_ = t .b .c .SetReadDeadline (time .Now ().Add (time .Millisecond ))
0 commit comments