Skip to content

Commit

Permalink
Merge #24839
Browse files Browse the repository at this point in the history
24839: sql: Skip DistSQL metadata tests when `-test.short` is passed r=abhimadan a=abhimadan

Under `make testshort`, metadata tests will be skipped.

Release note: None

Co-authored-by: Abhishek Madan <[email protected]>
  • Loading branch information
craig[bot] and Abhishek Madan committed Apr 17, 2018
2 parents 2f2cb3a + 01cd256 commit 63de506
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/sql/logictest/logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ type testClusterConfig struct {
distSQLUseDisk bool
// if set, enables DistSQL metadata propagation tests.
distSQLMetadataTestEnabled bool
// if set and the -test.short flag is passed, skip this config.
skipShort bool
// if set, any logic statement expected to succeed and parallelizable
// using RETURNING NOTHING syntax will be parallelized transparently.
// See logicStatement.parallelizeStmts.
Expand All @@ -387,11 +389,11 @@ var logicTestConfigs = []testClusterConfig{
},
{name: "parallel-stmts", numNodes: 1, parallelStmts: true, overrideDistSQLMode: "Off"},
{name: "distsql", numNodes: 3, useFakeSpanResolver: true, overrideDistSQLMode: "On"},
{name: "distsql-metadata", numNodes: 3, useFakeSpanResolver: true, overrideDistSQLMode: "On", distSQLMetadataTestEnabled: true},
{name: "distsql-metadata", numNodes: 3, useFakeSpanResolver: true, overrideDistSQLMode: "On", distSQLMetadataTestEnabled: true, skipShort: true},
{name: "distsql-disk", numNodes: 3, useFakeSpanResolver: true, overrideDistSQLMode: "On", distSQLUseDisk: true},
{name: "5node", numNodes: 5, overrideDistSQLMode: "Off"},
{name: "5node-distsql", numNodes: 5, overrideDistSQLMode: "On"},
{name: "5node-distsql-metadata", numNodes: 5, overrideDistSQLMode: "On", distSQLMetadataTestEnabled: true},
{name: "5node-distsql-metadata", numNodes: 5, overrideDistSQLMode: "On", distSQLMetadataTestEnabled: true, skipShort: true},
{name: "5node-distsql-disk", numNodes: 5, overrideDistSQLMode: "On", distSQLUseDisk: true},
}

Expand Down Expand Up @@ -1912,6 +1914,9 @@ func RunLogicTest(t *testing.T) {
}
// Top-level test: one per test configuration.
t.Run(cfg.name, func(t *testing.T) {
if testing.Short() && cfg.skipShort {
t.Skip("config skipped by -test.short")
}
if logicTestsConfigExclude != "" && cfg.name == logicTestsConfigExclude {
t.Skip("config excluded via env var")
}
Expand Down

0 comments on commit 63de506

Please sign in to comment.