Skip to content

Commit

Permalink
fix UT
Browse files Browse the repository at this point in the history
Signed-off-by: lance6716 <[email protected]>
  • Loading branch information
lance6716 committed Feb 26, 2024
1 parent 12725fa commit 18cb581
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/realtikvtest/addindextest2/global_sort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,16 @@ func TestIngestUseSameTS(t *testing.T) {

tikvStore := dom.Store().(helper.Storage)
newHelper := helper.NewHelper(tikvStore)
ts := oracle.ComposeTS(123456789, 0)
mvccResp, err := newHelper.GetMvccByEncodedKeyWithTS(idxKey, ts)
tsLowerBound := oracle.ComposeTS(123456789, 0)
tsUpperBound := oracle.ComposeTS(123456790, 0)
mvccResp, err := newHelper.GetMvccByEncodedKeyWithTS(idxKey, tsLowerBound)
require.NoError(t, err)
require.NotNil(t, mvccResp)
require.NotNil(t, mvccResp.Info)
require.Greater(t, len(mvccResp.Info.Writes), 0)
// TODO(lance6716): it should be greater than startTS after finishing development of ingesting with PiTR
require.Equal(t, ts, mvccResp.Info.Writes[0].CommitTs)
// TODO(lance6716): startTS is different with commitTS after finishing development of ingesting with PiTR
require.LessOrEqual(t, tsLowerBound, mvccResp.Info.Writes[0].StartTs)
require.Less(t, mvccResp.Info.Writes[0].StartTs, tsUpperBound)

tk.MustExec("set @@global.tidb_cloud_storage_uri = '';")
}

0 comments on commit 18cb581

Please sign in to comment.