Skip to content

Commit

Permalink
Try randomizing ports even more
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord committed Apr 12, 2023
1 parent 414c728 commit 5d2a38e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions go/test/endtoend/vreplication/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package vreplication

import (
"fmt"
"math/rand"
"testing"

"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -55,7 +56,7 @@ func TestMigrate(t *testing.T) {
defer vc.TearDown(t)

defaultCell = vc.Cells[defaultCellName]
vc.AddKeyspace(t, []*Cell{defaultCell}, "product", "0", initialProductVSchema, initialProductSchema, defaultReplicas, defaultRdonly, 100, nil)
vc.AddKeyspace(t, []*Cell{defaultCell}, "product", "0", initialProductVSchema, initialProductSchema, defaultReplicas, defaultRdonly, 100+rand.Intn(100), nil)
err := cluster.WaitForHealthyShard(vc.VtctldClient, "product", "0")
require.NoError(t, err)
vtgate = defaultCell.Vtgates[0]
Expand All @@ -74,7 +75,7 @@ func TestMigrate(t *testing.T) {
defer extVc.TearDown(t)

extCell2 := extVc.Cells[extCell]
extVc.AddKeyspace(t, []*Cell{extCell2}, "rating", "0", initialExternalVSchema, initialExternalSchema, 0, 0, 1000, nil)
extVc.AddKeyspace(t, []*Cell{extCell2}, "rating", "0", initialExternalVSchema, initialExternalSchema, 0, 0, 1000+rand.Intn(1000), nil)
extVtgate := extCell2.Vtgates[0]
require.NotNil(t, extVtgate)

Expand Down

0 comments on commit 5d2a38e

Please sign in to comment.