From 41a085523ddd6027270354d9c8ea6e90efbedda5 Mon Sep 17 00:00:00 2001 From: luancheng Date: Mon, 2 Sep 2019 20:28:24 +0800 Subject: [PATCH] fix comments --- syncer/syncer_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/syncer/syncer_test.go b/syncer/syncer_test.go index fea2f598d7..5286320996 100644 --- a/syncer/syncer_test.go +++ b/syncer/syncer_test.go @@ -710,7 +710,7 @@ func (s *testSyncerSuite) TestColumnMapping(c *C) { s.resetEventsGenerator(c) - //create dbConn and tables + //create db and tables events := mockBinlogEvents{ mockBinlogEvent{typ: DBCreate, args: []interface{}{"stest_3"}}, mockBinlogEvent{typ: TableCreate, args: []interface{}{"stest_3", "create table stest_3.log(id varchar(45))"}}, @@ -743,7 +743,7 @@ func (s *testSyncerSuite) TestColumnMapping(c *C) { dmlEvents = append(dmlEvents, dml.events...) } - // drop tables and dbConn + // drop tables and db events = mockBinlogEvents{ // TODO event generator support generate an event with multiple tables DDL mockBinlogEvent{typ: TableDrop, args: []interface{}{"stest_3", "log"}}, @@ -1241,12 +1241,12 @@ func (s *testSyncerSuite) TestSharding(c *C) { WillReturnRows(sqlmock.NewRows([]string{"Variable_name", "Value"}). AddRow("sql_mode", "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION")) - // mock checkpoint dbConn after create dbConn table1 table2 + // mock checkpoint db after create db table1 table2 s.mockCheckPointCreate(checkPointMock) s.mockCheckPointCreate(checkPointMock) s.mockCheckPointCreate(checkPointMock) - // mock downstream dbConn result + // mock downstream db result mock.ExpectBegin() mock.ExpectExec("CREATE DATABASE").WillReturnResult(sqlmock.NewResult(1, 1)) mock.ExpectCommit() @@ -1317,7 +1317,7 @@ func (s *testSyncerSuite) TestSharding(c *C) { // check expectations for mock baseConn if err := mock.ExpectationsWereMet(); err != nil { - c.Errorf("dbConn unfulfilled expectations: %s", err) + c.Errorf("db unfulfilled expectations: %s", err) } if err := fromMock.ExpectationsWereMet(); err != nil { c.Errorf("fromDB unfulfilled expectations: %s", err) @@ -1558,7 +1558,7 @@ func (s *testSyncerSuite) TestRun(c *C) { c.Assert(syncer.isClosed(), IsTrue) if err := mock.ExpectationsWereMet(); err != nil { - c.Errorf("dbConn unfulfilled expectations: %s", err) + c.Errorf("db unfulfilled expectations: %s", err) } if err := checkPointMock.ExpectationsWereMet(); err != nil {