Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: reduce some flaky timeout tests #56171

Merged
merged 4 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pkg/infoschema/test/clustertablestest/cluster_tables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ func TestMDLView(t *testing.T) {
}
}

func TestMDLViewPrivilege(t *testing.T) {
func TestMDLViewPrivilege1(t *testing.T) {
winoros marked this conversation as resolved.
Show resolved Hide resolved
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
require.NoError(t, tk.Session().Auth(&auth.UserIdentity{Username: "root", Hostname: "%"}, nil, nil, nil))
Expand All @@ -921,8 +921,14 @@ func TestMDLViewPrivilege(t *testing.T) {
_, err := tk.Exec("select * from mysql.tidb_mdl_view;")
require.ErrorContains(t, err, "view lack rights")

}

func TestMDLViewPrivilege2(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
// grant all privileges to test user.
require.NoError(t, tk.Session().Auth(&auth.UserIdentity{Username: "root", Hostname: "%"}, nil, nil, nil))
tk.MustExec("create user 'test'@'%' identified by '';")
tk.MustExec("grant all privileges on *.* to 'test'@'%';")
tk.MustExec("flush privileges;")
require.NoError(t, tk.Session().Auth(&auth.UserIdentity{Username: "test", Hostname: "%"}, nil, nil, nil))
Expand Down
3 changes: 1 addition & 2 deletions pkg/server/handler/tests/http_handler_serial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,10 @@ func TestDebugRoutes(t *testing.T) {
"/debug/pprof/block?debug=1",
"/debug/pprof/threadcreate?debug=1",
"/debug/pprof/cmdline",
"/debug/pprof/profile",
"/debug/pprof/profile?seconds=5",
"/debug/pprof/mutex?debug=1",
"/debug/pprof/symbol",
"/debug/pprof/trace",
"/debug/pprof/profile",
"/debug/gogc",
// "/debug/zip", // this creates unexpected goroutines which will make goleak complain, so we skip it for now
"/debug/ballast-object-sz",
Expand Down