Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jiyfhust committed Mar 20, 2024
1 parent 8cb9944 commit 34b8c3a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/parser/model/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -818,3 +818,16 @@ func TestTTLJobInterval(t *testing.T) {
require.NoError(t, err)
require.Equal(t, time.Hour*200, interval)
}

func TestClearReorgIntermediateInfo(t *testing.T) {
ptInfo := &PartitionInfo{}
ptInfo.DDLType = PartitionTypeHash
ptInfo.DDLExpr = "Test DDL Expr"
ptInfo.NewTableID = 1111

ptInfo.ClearReorgIntermediateInfo()
require.Equal(t, PartitionTypeNone, ptInfo.DDLType)
require.Equal(t, "", ptInfo.DDLExpr)
require.Equal(t, true, ptInfo.DDLColumns == nil)
require.Equal(t, int64(0), ptInfo.NewTableID)
}

0 comments on commit 34b8c3a

Please sign in to comment.