Skip to content

Commit

Permalink
executor, tests: move test cases from executor to integrationtest (PA…
Browse files Browse the repository at this point in the history
…RT 4) (#47877)

ref #47076
  • Loading branch information
Defined2014 authored Oct 22, 2023
1 parent c0364e5 commit 515899f
Show file tree
Hide file tree
Showing 22 changed files with 1,668 additions and 1,007 deletions.
2 changes: 1 addition & 1 deletion pkg/executor/test/jointest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ go_test(
],
flaky = True,
race = "on",
shard_count = 11,
shard_count = 12,
deps = [
"//pkg/config",
"//pkg/meta/autoid",
Expand Down
16 changes: 16 additions & 0 deletions pkg/executor/test/jointest/join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1435,3 +1435,19 @@ func TestIssue37932(t *testing.T) {
}
require.NoError(t, err)
}

func TestCartesianJoinPanic(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create table t(a int)")
tk.MustExec("insert into t values(1)")
tk.MustExec("set tidb_mem_quota_query = 1 << 20")
tk.MustExec("set global tidb_mem_oom_action = 'CANCEL'")
tk.MustExec("set global tidb_enable_tmp_storage_on_oom = off;")
for i := 0; i < 10; i++ {
tk.MustExec("insert into t select * from t")
}
err := tk.QueryToErr("desc analyze select * from t t1, t t2, t t3, t t4, t t5, t t6;")
require.ErrorContains(t, err, memory.PanicMemoryExceedWarnMsg+memory.WarnMsgSuffixForSingleQuery)
}
5 changes: 1 addition & 4 deletions pkg/executor/test/simpletest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@ go_test(
name = "simpletest_test",
timeout = "short",
srcs = [
"chunk_reuse_test.go",
"main_test.go",
"simple_test.go",
],
flaky = True,
race = "on",
shard_count = 36,
shard_count = 11,
deps = [
"//pkg/config",
"//pkg/errno",
"//pkg/parser/auth",
"//pkg/parser/model",
"//pkg/parser/mysql",
"//pkg/parser/terror",
"//pkg/planner/core",
"//pkg/session",
"//pkg/sessionctx",
"//pkg/store/mockstore",
Expand Down
138 changes: 0 additions & 138 deletions pkg/executor/test/simpletest/chunk_reuse_test.go

This file was deleted.

Loading

0 comments on commit 515899f

Please sign in to comment.