Skip to content

Commit

Permalink
fix all unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
3AceShowHand committed Nov 21, 2023
1 parent 16ad5a7 commit 60b4b36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sink/codec/canal/type_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func TestGetMySQLType4IntTypes(t *testing.T) {
require.Equal(t, internal.JavaSQLTypeSMALLINT, javaType)

columnInfo, ok = tableInfo.GetColumnInfo(colInfos[3].ID)
require.True(t, ok)
flag = tableInfo.ColumnsFlag[colInfos[3].ID]
mysqlType = getMySQLType(columnInfo, false)
require.Equal(t, "mediumint", mysqlType)
Expand All @@ -86,6 +87,7 @@ func TestGetMySQLType4IntTypes(t *testing.T) {
require.Equal(t, internal.JavaSQLTypeINTEGER, javaType)

columnInfo, ok = tableInfo.GetColumnInfo(colInfos[4].ID)
require.True(t, ok)
flag = tableInfo.ColumnsFlag[colInfos[4].ID]
mysqlType = getMySQLType(columnInfo, false)
require.Equal(t, "bigint", mysqlType)
Expand All @@ -107,6 +109,7 @@ func TestGetMySQLType4IntTypes(t *testing.T) {
_, _, colInfos = tableInfo.GetRowColInfos()

columnInfo, ok = tableInfo.GetColumnInfo(colInfos[0].ID)
require.True(t, ok)
flag = tableInfo.ColumnsFlag[colInfos[0].ID]
mysqlType = getMySQLType(columnInfo, false)
require.Equal(t, "int unsigned", mysqlType)
Expand Down

0 comments on commit 60b4b36

Please sign in to comment.