Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions go/cmd/vttestserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ func parseFlags() (config vttest.Config, env vttest.Environment, err error) {
flag.StringVar(&config.TransactionMode, "transaction_mode", "MULTI", "Transaction mode MULTI (default), SINGLE or TWOPC ")
flag.Float64Var(&config.TransactionTimeout, "queryserver-config-transaction-timeout", 0, "query server transaction timeout (in seconds), a transaction will be killed if it takes longer than this value")

flag.StringVar(&config.TabletHostName, "tablet_hostname", "localhost", "The hostname to use for the tablet otherwise it will be derived from OS' hostname")

flag.Parse()

if basePort != 0 {
Expand Down
3 changes: 3 additions & 0 deletions go/vt/vttest/local_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ type Config struct {
TransactionMode string

TransactionTimeout float64

// The host name to use for the table otherwise it will be resolved from the local hostname
TabletHostName string
}

// InitSchemas is a shortcut for tests that just want to setup a single
Expand Down
3 changes: 3 additions & 0 deletions go/vt/vttest/vtprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ func VtcomboProcess(env Environment, args *Config, mysql MySQLManager) *VtProces
if args.TransactionTimeout != 0 {
vt.ExtraArgs = append(vt.ExtraArgs, "-queryserver-config-transaction-timeout", fmt.Sprintf("%f", args.TransactionTimeout))
}
if args.TabletHostName != "" {
vt.ExtraArgs = append(vt.ExtraArgs, []string{"-tablet_hostname", args.TabletHostName}...)
}

if socket != "" {
vt.ExtraArgs = append(vt.ExtraArgs, []string{
Expand Down