Skip to content

Commit

Permalink
Merge branch 'master' into exit-immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot[bot] authored Nov 20, 2024
2 parents e3286a4 + 76e3b43 commit f9951a3
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions tests/integrations/realcluster/ts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,11 @@ func (s *tsSuite) TestTS() {
db.MustClose()
}

type msTSSuite struct {
clusterSuite
}

func TestMSTS(t *testing.T) {
suite.Run(t, &msTSSuite{
suite.Run(t, &tsSuite{
clusterSuite: clusterSuite{
suiteName: "ts",
ms: true,
},
})
}

func (s *msTSSuite) TestTS() {
re := require.New(s.T())

db := OpenTestDB(s.T())
db.MustExec("use test")
db.MustExec("drop table if exists t")
db.MustExec("create table t(a int, index i(a))")
db.MustExec("insert t values (1), (2), (3)")
var rows int
err := db.inner.Raw("select count(*) from t").Row().Scan(&rows)
re.NoError(err)
re.Equal(3, rows)

re.NoError(err)
re.Equal(3, rows)

var ts uint64
err = db.inner.Begin().Raw("select @@tidb_current_ts").Scan(&ts).Rollback().Error
re.NoError(err)
re.NotEqual(0, GetTimeFromTS(ts))

db.MustClose()
}

0 comments on commit f9951a3

Please sign in to comment.