diff --git a/cdc/model/changefeed_test.go b/cdc/model/changefeed_test.go index 2029d0a8b22..c58bf67343f 100644 --- a/cdc/model/changefeed_test.go +++ b/cdc/model/changefeed_test.go @@ -345,7 +345,7 @@ func (s *changefeedSuite) TestGetTs(c *check.C) { CreateTime: createTime, } ) - c.Assert(info.GetStartTs(), check.Equals, oracle.EncodeTSO(createTime.Unix()*1000)) + c.Assert(info.GetStartTs(), check.Equals, oracle.GoTimeToTS(createTime)) info.StartTs = startTs c.Assert(info.GetStartTs(), check.Equals, startTs) diff --git a/cdc/puller/mock_puller_test.go b/cdc/puller/mock_puller_test.go index 98541065556..1c80954cd3c 100644 --- a/cdc/puller/mock_puller_test.go +++ b/cdc/puller/mock_puller_test.go @@ -54,7 +54,7 @@ func (s *mockPullerSuite) TestTxnSort(c *check.C) { pm.MustExec("insert into test.test(id, a) values(?, ?)", 2, 2) pm.MustExec("insert into test.test(id, a) values(?, ?)", 3, 3) pm.MustExec("delete from test.test") - waitForGrowingTs(&ts, oracle.EncodeTSO(time.Now().Unix()*1000)) + waitForGrowingTs(&ts, oracle.GoTimeToTS(time.Now())) } func (s *mockPullerSuite) TestDDLPuller(c *check.C) { @@ -93,7 +93,7 @@ func (s *mockPullerSuite) TestDDLPuller(c *check.C) { pm.MustExec("insert into test.test(id, a) values(?, ?)", 2, 2) pm.MustExec("insert into test.test(id, a) values(?, ?)", 3, 3) pm.MustExec("delete from test.test") - waitForGrowingTs(&ts, oracle.EncodeTSO(time.Now().Unix()*1000)) + waitForGrowingTs(&ts, oracle.GoTimeToTS(time.Now())) } func (s *mockPullerSuite) TestStartTs(c *check.C) { @@ -122,7 +122,7 @@ func (s *mockPullerSuite) TestStartTs(c *check.C) { pm.MustExec("insert into test.test(id, a) values(?, ?)", 2, 2) pm.MustExec("insert into test.test(id, a) values(?, ?)", 3, 3) pm.MustExec("delete from test.test") - waitForGrowingTs(&ts, oracle.EncodeTSO(time.Now().Unix()*1000)) + waitForGrowingTs(&ts, oracle.GoTimeToTS(time.Now())) cancel() mu.Lock() index := len(rawTxns) / 2