Skip to content

Commit 4b9c007

Browse files
committed
sql: skip external process under deadlock in TestShowLastQueryStatistics
If we have external-process test tenant and run under the deadlock config, sometimes we can exceed 1s limit on planning latency. This behavior seems somewhat expected, so let's just skip the external-process config (which was enabled recently). Release note: None
1 parent b2093a9 commit 4b9c007

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkg/sql/conn_executor_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,8 +1408,15 @@ func TestShowLastQueryStatistics(t *testing.T) {
14081408
skip.UnderRace(t, "measure planning latency which is slower than usual under race")
14091409

14101410
ctx := context.Background()
1411-
params := base.TestServerArgs{}
1412-
s, sqlConn, _ := serverutils.StartServer(t, params)
1411+
var testTenant base.DefaultTestTenantOptions
1412+
if syncutil.DeadlockEnabled {
1413+
// Under deadlock, the planning latency in the external process mode can
1414+
// sometimes exceed 1s allowed limit.
1415+
testTenant = base.TestSkipForExternalProcessMode()
1416+
}
1417+
s, sqlConn, _ := serverutils.StartServer(t, base.TestServerArgs{
1418+
DefaultTestTenant: testTenant,
1419+
})
14131420
defer s.Stopper().Stop(ctx)
14141421

14151422
testCases := []struct {

0 commit comments

Comments
 (0)