Skip to content

Commit

Permalink
Merge pull request #22803 from benesch/partition-deflake
Browse files Browse the repository at this point in the history
partitionccl: deflake TestInitialRepartitioning
  • Loading branch information
benesch authored Feb 20, 2018
2 parents b98b8a7 + 39bce4b commit 42d0147
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/ccl/partitionccl/partition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,6 @@ func TestSelectPartitionExprs(t *testing.T) {

func TestRepartitioning(t *testing.T) {
defer leaktest.AfterTest(t)()
t.Skip("#22360")

rng, _ := randutil.NewPseudoRand()
testCases, err := allRepartitioningTests(allPartitioningTests(rng))
Expand All @@ -1235,11 +1234,14 @@ func TestRepartitioning(t *testing.T) {
sqlDB, cleanup := setupPartitioningTestCluster(ctx, t)
defer cleanup()

for _, test := range testCases {
for i, test := range testCases {
t.Run(fmt.Sprintf("%s/%s", test.old.name, test.new.name), func(t *testing.T) {
sqlDB.Exec(t, `DROP DATABASE IF EXISTS data`)
sqlDB.Exec(t, `CREATE DATABASE data`)
sqlDB.Exec(t, `USE data`)
// NOTE: We used to drop and recreate a database named
// "data" at the start of every test, but DROP DATABASE
// would occasionally hang forever.
dbName := fmt.Sprintf("data%d", i)
sqlDB.Exec(t, `CREATE DATABASE `+dbName)
sqlDB.Exec(t, `USE `+dbName)

{
if err := test.old.parse(); err != nil {
Expand Down

0 comments on commit 42d0147

Please sign in to comment.