Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
sdojjy committed Dec 30, 2021
1 parent 3aada75 commit f1ca122
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 0 additions & 10 deletions cdc/processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@ func newProcessor(ctx cdcContext.Context) *processor {
return p
}

func newProcessor4Test(ctx cdcContext.Context,
createTablePipeline func(ctx cdcContext.Context, tableID model.TableID, replicaInfo *model.TableReplicaInfo) (tablepipeline.TablePipeline, error),
) *processor {
p := newProcessor(ctx)
p.lazyInit = func(ctx cdcContext.Context) error { return nil }
p.createTablePipeline = createTablePipeline
p.sinkManager = &sink.Manager{}
return p
}

// Tick implements the `orchestrator.State` interface
// the `state` parameter is sent by the etcd worker, the `state` must be a snapshot of KVs in etcd
// The main logic of processor is in this function, including the calculation of many kinds of ts, maintain table pipeline, error handling, etc.
Expand Down
2 changes: 2 additions & 0 deletions cdc/processor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/pingcap/tiflow/cdc/entry"
"github.com/pingcap/tiflow/cdc/model"
tablepipeline "github.com/pingcap/tiflow/cdc/processor/pipeline"
"github.com/pingcap/tiflow/cdc/sink"
cdcContext "github.com/pingcap/tiflow/pkg/context"
cerror "github.com/pingcap/tiflow/pkg/errors"
"github.com/pingcap/tiflow/pkg/etcd"
Expand All @@ -49,6 +50,7 @@ func newProcessor4Test(
p.lazyInit = func(ctx cdcContext.Context) error { return nil }
p.createTablePipeline = createTablePipeline
p.schemaStorage = &mockSchemaStorage{c: c}
p.sinkManager = &sink.Manager{}
return p
}

Expand Down

0 comments on commit f1ca122

Please sign in to comment.