diff --git a/go/test/endtoend/tabletmanager/commands_test.go b/go/test/endtoend/tabletmanager/commands_test.go index 911e097a17c..55126cb22e8 100644 --- a/go/test/endtoend/tabletmanager/commands_test.go +++ b/go/test/endtoend/tabletmanager/commands_test.go @@ -81,8 +81,14 @@ func TestTabletCommands(t *testing.T) { require.NoError(t, err) }) t.Run("ConcludeTransaction", func(t *testing.T) { - _, err := clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ConcludeTransaction", "ks:-80:1234", "ks/80-") - require.NoError(t, err) + output, err := clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ConcludeTransaction", "ks:0:1234") + assert.NoError(t, err) + assert.Contains(t, output, "Successfully concluded the distributed transaction") + }) + t.Run("ConcludeTransaction with participants", func(t *testing.T) { + output, err := clusterInstance.VtctldClientProcess.ExecuteCommandWithOutput("ConcludeTransaction", "ks:0:1234", "ks/0") + assert.NoError(t, err) + assert.Contains(t, output, "Successfully concluded the distributed transaction") }) // check Ping / RefreshState / RefreshStateByShard err = clusterInstance.VtctldClientProcess.ExecuteCommand("PingTablet", primaryTablet.Alias) diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index 299aaf174db..ffb4865f3c7 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -2468,7 +2468,7 @@ func (s *VtctldServer) ConcludeTransaction(ctx context.Context, req *vtctldatapb return nil, err } - if err = s.tmc.ConcludeTransaction(newCtx, primary.Tablet, req.Dtid, true); err != nil { + if err = s.tmc.ConcludeTransaction(ctx, primary.Tablet, req.Dtid, true); err != nil { return nil, err }