Skip to content

Commit

Permalink
session: move the failpoint test to testSessionSerialSuite (pingcap#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
jackysp authored and XiaTianliang committed Dec 21, 2019
1 parent d7b1996 commit 5b3fb73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions session/session_fail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/pingcap/tidb/util/testkit"
)

func (s *testSessionSuite2) TestFailStatementCommit(c *C) {
func (s *testSessionSerialSuite) TestFailStatementCommit(c *C) {

tk := testkit.NewTestKitWithInit(c, s.store)
tk.MustExec("create table t (id int)")
Expand Down Expand Up @@ -58,7 +58,7 @@ func (s *testSessionSuite2) TestFailStatementCommit(c *C) {
tk.MustQuery(`select * from t`).Check(testkit.Rows("1", "2"))
}

func (s *testSessionSuite2) TestFailStatementCommitInRetry(c *C) {
func (s *testSessionSerialSuite) TestFailStatementCommitInRetry(c *C) {
tk := testkit.NewTestKitWithInit(c, s.store)
tk.MustExec("create table t (id int)")

Expand All @@ -78,7 +78,7 @@ func (s *testSessionSuite2) TestFailStatementCommitInRetry(c *C) {
tk.MustQuery(`select * from t`).Check(testkit.Rows("6"))
}

func (s *testSessionSuite2) TestGetTSFailDirtyState(c *C) {
func (s *testSessionSerialSuite) TestGetTSFailDirtyState(c *C) {
tk := testkit.NewTestKitWithInit(c, s.store)
tk.MustExec("create table t (id int)")

Expand All @@ -96,7 +96,7 @@ func (s *testSessionSuite2) TestGetTSFailDirtyState(c *C) {
c.Assert(failpoint.Disable("github.com/pingcap/tidb/session/mockGetTSFail"), IsNil)
}

func (s *testSessionSuite2) TestGetTSFailDirtyStateInretry(c *C) {
func (s *testSessionSerialSuite) TestGetTSFailDirtyStateInretry(c *C) {
defer func() {
c.Assert(failpoint.Disable("github.com/pingcap/tidb/session/mockCommitError"), IsNil)
c.Assert(failpoint.Disable("github.com/pingcap/tidb/store/tikv/mockGetTSErrorInRetry"), IsNil)
Expand Down
4 changes: 2 additions & 2 deletions session/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2425,7 +2425,7 @@ func (s *testSessionSuite2) TestDBUserNameLength(c *C) {
tk.MustExec(`grant all privileges on test.t to 'abcddfjakldfjaldddds'@'%'`)
}

func (s *testSessionSuite2) TestKVVars(c *C) {
func (s *testSessionSerialSuite) TestKVVars(c *C) {
c.Skip("there is no backoff here in the large txn, so this test is stale")
tk := testkit.NewTestKitWithInit(c, s.store)
tk.MustExec("create table kvvars (a int, b int)")
Expand Down Expand Up @@ -2509,7 +2509,7 @@ func (s *testSessionSuite2) TestEnablePartition(c *C) {
tk1.MustQuery("show variables like 'tidb_enable_table_partition'").Check(testkit.Rows("tidb_enable_table_partition on"))
}

func (s *testSessionSuite2) TestTxnRetryErrMsg(c *C) {
func (s *testSessionSerialSuite) TestTxnRetryErrMsg(c *C) {
tk1 := testkit.NewTestKitWithInit(c, s.store)
tk2 := testkit.NewTestKitWithInit(c, s.store)
tk1.MustExec("create table no_retry (id int)")
Expand Down

0 comments on commit 5b3fb73

Please sign in to comment.