Skip to content

Commit f0df8b7

Browse files
committed
drpc: run SQL colexec tests with DRPC enabled at random
This change introduces a package-level setting that randomly enables drpc in the sql package. Epic: CRDB-48935 Fixes: #155575 Release note: None
1 parent dcdbb6d commit f0df8b7

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

pkg/sql/colexec/colbuilder/main_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"os"
1010
"testing"
1111

12+
"github.com/cockroachdb/cockroach/pkg/base"
1213
"github.com/cockroachdb/cockroach/pkg/security/securityassets"
1314
"github.com/cockroachdb/cockroach/pkg/security/securitytest"
1415
"github.com/cockroachdb/cockroach/pkg/server"
@@ -24,5 +25,6 @@ func TestMain(m *testing.M) {
2425
randutil.SeedForTests()
2526
serverutils.InitTestServerFactory(server.TestServerFactory)
2627
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
28+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2729
os.Exit(m.Run())
2830
}

pkg/sql/colexecerror/main_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"os"
1010
"testing"
1111

12+
"github.com/cockroachdb/cockroach/pkg/base"
1213
"github.com/cockroachdb/cockroach/pkg/security/securityassets"
1314
"github.com/cockroachdb/cockroach/pkg/security/securitytest"
1415
"github.com/cockroachdb/cockroach/pkg/server"
@@ -22,6 +23,7 @@ func TestMain(m *testing.M) {
2223
securityassets.SetLoader(securitytest.EmbeddedAssets)
2324
randutil.SeedForTests()
2425
serverutils.InitTestServerFactory(server.TestServerFactory)
26+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2527

2628
os.Exit(m.Run())
2729
}

pkg/sql/colfetcher/main_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"os"
1010
"testing"
1111

12+
"github.com/cockroachdb/cockroach/pkg/base"
1213
"github.com/cockroachdb/cockroach/pkg/security/securityassets"
1314
"github.com/cockroachdb/cockroach/pkg/security/securitytest"
1415
"github.com/cockroachdb/cockroach/pkg/server"
@@ -24,5 +25,6 @@ func TestMain(m *testing.M) {
2425
randutil.SeedForTests()
2526
serverutils.InitTestServerFactory(server.TestServerFactory)
2627
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
28+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2729
os.Exit(m.Run())
2830
}

pkg/sql/colflow/main_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"os"
1313
"testing"
1414

15+
"github.com/cockroachdb/cockroach/pkg/base"
1516
"github.com/cockroachdb/cockroach/pkg/col/coldata"
1617
"github.com/cockroachdb/cockroach/pkg/col/coldataext"
1718
"github.com/cockroachdb/cockroach/pkg/security/securityassets"
@@ -52,6 +53,7 @@ func TestMain(m *testing.M) {
5253
securityassets.SetLoader(securitytest.EmbeddedAssets)
5354
randutil.SeedForTests()
5455
serverutils.InitTestServerFactory(server.TestServerFactory)
56+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
5557
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
5658
os.Exit(func() int {
5759
ctx := context.Background()

0 commit comments

Comments
 (0)