Skip to content

Commit

Permalink
tests(ticdc): resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Jan 7, 2022
1 parent 344926e commit 3cfe460
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion cdc/model/changefeed.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/pingcap/tiflow/pkg/config"
"github.com/pingcap/tiflow/pkg/cyclic/mark"
cerror "github.com/pingcap/tiflow/pkg/errors"
"github.com/pingcap/tiflow/pkg/version"
"github.com/tikv/client-go/v2/oracle"
"go.uber.org/zap"
)
Expand Down Expand Up @@ -279,7 +280,7 @@ func (info *ChangeFeedInfo) fixState() {
// This corresponds to the case of failure or error.
case AdminNone, AdminResume:
if info.Error != nil {
if cerrors.ChangefeedFastFailErrorCode(errors.RFCErrorCode(info.Error.Code)) {
if cerror.ChangefeedFastFailErrorCode(errors.RFCErrorCode(info.Error.Code)) {
state = StateFailed
} else {
state = StateError
Expand Down
8 changes: 4 additions & 4 deletions cdc/model/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func TestFixState(t *testing.T) {
AdminJobType: AdminNone,
State: StateNormal,
Error: &RunningError{
Code: string(cerrors.ErrGCTTLExceeded.RFCCode()),
Code: string(cerror.ErrGCTTLExceeded.RFCCode()),
},
},
expectedState: StateFailed,
Expand All @@ -268,7 +268,7 @@ func TestFixState(t *testing.T) {
AdminJobType: AdminResume,
State: StateNormal,
Error: &RunningError{
Code: string(cerrors.ErrGCTTLExceeded.RFCCode()),
Code: string(cerror.ErrGCTTLExceeded.RFCCode()),
},
},
expectedState: StateFailed,
Expand All @@ -278,7 +278,7 @@ func TestFixState(t *testing.T) {
AdminJobType: AdminNone,
State: StateNormal,
Error: &RunningError{
Code: string(cerrors.ErrClusterIDMismatch.RFCCode()),
Code: string(cerror.ErrClusterIDMismatch.RFCCode()),
},
},
expectedState: StateError,
Expand All @@ -288,7 +288,7 @@ func TestFixState(t *testing.T) {
AdminJobType: AdminResume,
State: StateNormal,
Error: &RunningError{
Code: string(cerrors.ErrClusterIDMismatch.RFCCode()),
Code: string(cerror.ErrClusterIDMismatch.RFCCode()),
},
},
expectedState: StateError,
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/util/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/BurntSushi/toml"
"github.com/pingcap/errors"
"github.com/pingcap/log"
"github.com/pingcap/tiflow/cdc/model"
cmdconetxt "github.com/pingcap/tiflow/pkg/cmd/context"
"github.com/pingcap/tiflow/pkg/etcd"
"github.com/pingcap/tiflow/pkg/logutil"
Expand Down
1 change: 0 additions & 1 deletion pkg/version/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/coreos/go-semver/semver"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/log"
"github.com/pingcap/tiflow/cdc/model"
cerror "github.com/pingcap/tiflow/pkg/errors"
"github.com/pingcap/tiflow/pkg/httputil"
"github.com/pingcap/tiflow/pkg/security"
Expand Down
1 change: 0 additions & 1 deletion pkg/version/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (

"github.com/coreos/go-semver/semver"
"github.com/pingcap/kvproto/pkg/metapb"
"github.com/pingcap/tiflow/cdc/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
pd "github.com/tikv/pd/client"
Expand Down

0 comments on commit 3cfe460

Please sign in to comment.