Skip to content

Commit c955c98

Browse files
committed
don't know why a test fails
Signed-off-by: lance6716 <[email protected]>
1 parent af37082 commit c955c98

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

canal/canal_test.go

+2-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type canalTestSuite struct {
2020
c *Canal
2121
}
2222

23-
func TestCanal(t *testing.T) {
23+
func TestCanalSuite(t *testing.T) {
2424
suite.Run(t, new(canalTestSuite))
2525
}
2626

@@ -78,7 +78,7 @@ func (s *canalTestSuite) SetupSuite() {
7878

7979
s.execute("SET GLOBAL binlog_format = 'ROW'")
8080

81-
s.c.SetEventHandler(&testEventHandler{t: s.T()})
81+
s.c.SetEventHandler(&testEventHandler{})
8282
go func() {
8383
set, _ := mysql.ParseGTIDSet("mysql", "")
8484
err = s.c.StartFromGTID(set)
@@ -105,7 +105,6 @@ func (s *canalTestSuite) execute(query string, args ...interface{}) *mysql.Resul
105105

106106
type testEventHandler struct {
107107
DummyEventHandler
108-
t *testing.T
109108
}
110109

111110
func (h *testEventHandler) OnRow(e *RowsEvent) error {
@@ -121,10 +120,6 @@ func (h *testEventHandler) String() string {
121120
return "testEventHandler"
122121
}
123122

124-
func (h *testEventHandler) OnPosSynced(header *replication.EventHeader, p mysql.Position, set mysql.GTIDSet, f bool) error {
125-
return nil
126-
}
127-
128123
func (s *canalTestSuite) TestCanal() {
129124
<-s.c.WaitDumpDone()
130125

0 commit comments

Comments
 (0)