Skip to content

Commit a7ecf5a

Browse files
craig[bot]annrpom
andcommitted
Merge #142604
142604: sqlccl: dump stacks upon statement not timing out r=annrpom a=annrpom Epic: none Fixes: #141111 Release note: None Co-authored-by: Annie Pompa <[email protected]>
2 parents fda2a1e + 3169099 commit a7ecf5a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pkg/ccl/testccl/sqlccl/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ go_test(
5757
"//pkg/testutils/skip",
5858
"//pkg/testutils/sqlutils",
5959
"//pkg/testutils/testcluster",
60+
"//pkg/util/allstacks",
6061
"//pkg/util/ctxgroup",
6162
"//pkg/util/hlc",
6263
"//pkg/util/leaktest",

pkg/ccl/testccl/sqlccl/explain_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
2222
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
2323
"github.com/cockroachdb/cockroach/pkg/testutils/sqlutils"
24+
"github.com/cockroachdb/cockroach/pkg/util/allstacks"
2425
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
2526
"github.com/cockroachdb/cockroach/pkg/util/log"
2627
"github.com/cockroachdb/cockroach/pkg/util/randutil"
@@ -299,6 +300,8 @@ func TestExplainGist(t *testing.T) {
299300
}
300301
case <-time.After(time.Minute):
301302
t.Log(successfulStmts.String())
303+
sl := allstacks.Get()
304+
t.Logf("stacks:\n\n%s", sl)
302305
t.Fatalf("stmt wasn't canceled by statement_timeout of 0.1s - ran at least for 1m: %s", stmt)
303306
}
304307
}

0 commit comments

Comments
 (0)