integration_tests: speed up TestCommitOnTiKVDiskFullOpt (#411)

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
This commit is contained in:
Yilin Chen 2022-01-04 14:58:47 +08:00 committed by GitHub
parent 62d6b4a2e8
commit dd263ab9f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -230,7 +230,9 @@ func (s *testCommitterSuite) TestCommitOnTiKVDiskFullOpt() {
s.Nil(failpoint.Enable("tikvclient/rpcAllowedOnAlmostFull", `return("true")`))
txn = s.begin()
txn.Set([]byte("c"), []byte("c1"))
err = txn.Commit(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel()
err = txn.Commit(ctx)
s.NotNil(err)
s.Nil(failpoint.Disable("tikvclient/rpcAllowedOnAlmostFull"))
}