Skip to content

Commit dba914a

Browse files
craig[bot]Nukitt
andcommitted
Merge #157192
157192: sql, drpc: enable DRPC randomly for sql tests r=yuzefovich,cthumuluru-crdb a=Nukitt This change introduces a package-level setting that randomly enables drpc in the sql package. Epic: CRDB-48935 Release note: None Fixes: #153925 Fixes: #155573 Fixes: #155574 Fixes: #155575 Fixes: #155576 Fixes: #155579 Fixes: #155580 Fixes: #155581 Fixes: #155582 Fixes: #155583 Note: 1. `pkg/sql/exec/execbuilder/` is disabled for now since some tests in `tests/local` fail due to addition of the cluster setting of drpc(`rpc.experimental_drpc.enabled`) which is unexpected for the test. 2. `pkg/sql/logictest` is untouched for now due to many failing tests, created a separate [tracking ticket for it here](#157201) Co-authored-by: Nukitt <[email protected]>
2 parents 9425e71 + ea34a96 commit dba914a

File tree

77 files changed

+149
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+149
-5
lines changed

pkg/sql/backfill/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/catalog/bootstrap/main_test.go

Lines changed: 2 additions & 1 deletion
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,6 +25,6 @@ func TestMain(m *testing.M) {
2425
randutil.SeedForTests()
2526
serverutils.InitTestServerFactory(server.TestServerFactory)
2627
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
27-
28+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2829
os.Exit(m.Run())
2930
}

pkg/sql/catalog/descs/main_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"os"
99
"testing"
1010

11+
"github.com/cockroachdb/cockroach/pkg/base"
1112
"github.com/cockroachdb/cockroach/pkg/security/securityassets"
1213
"github.com/cockroachdb/cockroach/pkg/security/securitytest"
1314
"github.com/cockroachdb/cockroach/pkg/server"
@@ -21,7 +22,7 @@ func TestMain(m *testing.M) {
2122
randutil.SeedForTests()
2223
serverutils.InitTestServerFactory(server.TestServerFactory)
2324
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
24-
25+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2526
os.Exit(m.Run())
2627
}
2728

pkg/sql/catalog/externalcatalog/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
randutil.SeedForTests()
2324
serverutils.InitTestServerFactory(server.TestServerFactory)
2425
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
26+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2527
os.Exit(m.Run())
2628
}
2729

pkg/sql/catalog/internal/catkv/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"
@@ -20,5 +21,6 @@ func TestMain(m *testing.M) {
2021
securityassets.SetLoader(securitytest.EmbeddedAssets)
2122
randutil.SeedForTests()
2223
serverutils.InitTestServerFactory(server.TestServerFactory)
24+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2325
os.Exit(m.Run())
2426
}

pkg/sql/catalog/lease/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"
@@ -27,5 +28,6 @@ func TestMain(m *testing.M) {
2728
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
2829
// Disable create table with schema_locked for this entire package.
2930
sql.TestForceDisableCreateTableWithSchemaLocked()
31+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
3032
os.Exit(m.Run())
3133
}

pkg/sql/catalog/redact/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,5 +23,6 @@ func TestMain(m *testing.M) {
2223
securityassets.SetLoader(securitytest.EmbeddedAssets)
2324
serverutils.InitTestServerFactory(server.TestServerFactory)
2425
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
26+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2527
os.Exit(m.Run())
2628
}

pkg/sql/catalog/resolver/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/catalog/schematelemetry/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,5 +23,6 @@ func TestMain(m *testing.M) {
2223
securityassets.SetLoader(securitytest.EmbeddedAssets)
2324
serverutils.InitTestServerFactory(server.TestServerFactory)
2425
serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
26+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2527
os.Exit(m.Run())
2628
}

pkg/sql/catalog/systemschema_test/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"
@@ -20,5 +21,6 @@ func TestMain(m *testing.M) {
2021
securityassets.SetLoader(securitytest.EmbeddedAssets)
2122
randutil.SeedForTests()
2223
serverutils.InitTestServerFactory(server.TestServerFactory)
24+
serverutils.TestingGlobalDRPCOption(base.TestDRPCEnabledRandomly)
2325
os.Exit(m.Run())
2426
}

0 commit comments

Comments
 (0)