Skip to content

Commit

Permalink
TestStreamMigrateMainflow: fix panic in test (#14420)
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
  • Loading branch information
rohit-nayak-ps authored Nov 1, 2023
1 parent e802cff commit 3037acd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go/vt/wrangler/fake_tablet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import (
"testing"
"time"

vdiff2 "vitess.io/vitess/go/vt/vttablet/tabletmanager/vdiff"
"vitess.io/vitess/go/vt/vttablet/tabletserver/tabletenv"

"github.com/stretchr/testify/require"
"google.golang.org/grpc"

Expand Down Expand Up @@ -187,7 +190,7 @@ func (ft *fakeTablet) StartActionLoop(t *testing.T, wr *Wrangler) {
ft.Tablet.PortMap["vt"] = vtPort
ft.Tablet.PortMap["grpc"] = gRPCPort
ft.Tablet.Hostname = "127.0.0.1"

config := &tabletenv.TabletConfig{}
// Create a test tm on that port, and re-read the record
// (it has new ports and IP).
ft.TM = &tabletmanager.TabletManager{
Expand All @@ -196,6 +199,7 @@ func (ft *fakeTablet) StartActionLoop(t *testing.T, wr *Wrangler) {
MysqlDaemon: ft.FakeMysqlDaemon,
DBConfigs: &dbconfigs.DBConfigs{},
QueryServiceControl: tabletservermock.NewController(),
VDiffEngine: vdiff2.NewEngine(config, wr.TopoServer(), ft.Tablet),
}
if err := ft.TM.Start(ft.Tablet, 0); err != nil {
t.Fatal(err)
Expand Down

0 comments on commit 3037acd

Please sign in to comment.