Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
3pointer committed Sep 2, 2019
1 parent f965331 commit 41a0855
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions syncer/syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))"}},
Expand Down Expand Up @@ -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"}},
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 41a0855

Please sign in to comment.