Skip to content

Commit

Permalink
adjust test
Browse files Browse the repository at this point in the history
  • Loading branch information
SunRunAway committed Jun 20, 2019
1 parent 12b9b79 commit f1f47c4
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions infoschema/tables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"fmt"
"os"
"strconv"
"strings"

. "github.com/pingcap/check"
"github.com/pingcap/parser/auth"
Expand Down Expand Up @@ -286,19 +287,25 @@ func (s *testTableSuite) TestSomeTables(c *C) {
DB: "test",
Command: byte(2),
State: 2,
Info: "do something",
Info: strings.Repeat("x", 101),
StmtCtx: tk.Se.GetSessionVars().StmtCtx,
}
tk.Se.SetSessionManager(sm)
tk.MustQuery("select * from information_schema.PROCESSLIST order by ID;").Check(
testkit.Rows("1 user-1 localhost information_schema Quit 9223372036 1 do something 0",
"2 user-2 localhost test Init DB 9223372036 2 do something 0"))
tk.MustQuery("SHOW PROCESSLIST;").Check(
testkit.Rows("1 user-1 localhost information_schema Quit 9223372036 1 do something",
"2 user-2 localhost test Init DB 9223372036 2 do something"))
tk.MustQuery("SHOW FULL PROCESSLIST;").Check(
testkit.Rows("1 user-1 localhost information_schema Quit 9223372036 1 do something",
"2 user-2 localhost test Init DB 9223372036 2 do something"))
tk.MustQuery("select * from information_schema.PROCESSLIST order by ID;").Sort().Check(
testkit.Rows(
fmt.Sprintf("1 user-1 localhost information_schema Quit 9223372036 1 %s 0", "do something"),
fmt.Sprintf("2 user-2 localhost test Init DB 9223372036 2 %s 0", strings.Repeat("x", 101)),
))
tk.MustQuery("SHOW PROCESSLIST;").Sort().Check(
testkit.Rows(
fmt.Sprintf("1 user-1 localhost information_schema Quit 9223372036 1 %s", "do something"),
fmt.Sprintf("2 user-2 localhost test Init DB 9223372036 2 %s", strings.Repeat("x", 100)),
))
tk.MustQuery("SHOW FULL PROCESSLIST;").Sort().Check(
testkit.Rows(
fmt.Sprintf("1 user-1 localhost information_schema Quit 9223372036 1 %s", "do something"),
fmt.Sprintf("2 user-2 localhost test Init DB 9223372036 2 %s", strings.Repeat("x", 101)),
))
}

func (s *testTableSuite) TestSchemataCharacterSet(c *C) {
Expand Down

0 comments on commit f1f47c4

Please sign in to comment.