Skip to content

Commit

Permalink
remove check log in the ddl puller
Browse files Browse the repository at this point in the history
  • Loading branch information
3AceShowHand committed Dec 15, 2023
1 parent 3b1a0b2 commit c4ec71a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions cdc/puller/ddl_puller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
"sync"
"sync/atomic"
"testing"
"time"

"github.com/benbjohnson/clock"
"github.com/pingcap/errors"
"github.com/pingcap/log"
timodel "github.com/pingcap/tidb/pkg/parser/model"
Expand Down Expand Up @@ -734,8 +732,6 @@ func TestResolvedTsStuck(t *testing.T) {
)
require.Nil(t, err)
p := NewDDLPuller(ctx, up, startTs, ctx.ChangefeedVars().ID, schemaStorage, f)
mockClock := clock.NewMock()
p.(*ddlPullerImpl).clock = mockClock

p.(*ddlPullerImpl).ddlJobPuller, _ = newMockDDLJobPuller(t, mockPuller, false)
var wg sync.WaitGroup
Expand All @@ -760,18 +756,6 @@ func TestResolvedTsStuck(t *testing.T) {
waitResolvedTsGrowing(t, p, 30)
require.Equal(t, 0, logs.Len())

mockClock.Add(2 * ddlPullerStuckWarnDuration)
for i := 0; i < 20; i++ {
mockClock.Add(time.Second)
if logs.Len() > 0 {
break
}
time.Sleep(10 * time.Millisecond)
if i == 19 {
t.Fatal("warning log not printed")
}
}

mockPuller.appendResolvedTs(40)
waitResolvedTsGrowing(t, p, 40)
}
Expand Down

0 comments on commit c4ec71a

Please sign in to comment.