diff --git a/components/playground/instance/instance.go b/components/playground/instance/instance.go index 1a97e4c6d2..78da752c33 100644 --- a/components/playground/instance/instance.go +++ b/components/playground/instance/instance.go @@ -82,7 +82,7 @@ type Instance interface { // The implementation should be safe to call Wait multi times. Wait() error // PrepareBinary use given binpath or download from tiup mirrors. - PrepareBinary(componentName string, version utils.Version) error + PrepareBinary(binaryName string, componentName string, version utils.Version) error } func (inst *instance) MetricAddr() (r MetricAddr) { @@ -92,8 +92,8 @@ func (inst *instance) MetricAddr() (r MetricAddr) { return } -func (inst *instance) PrepareBinary(componentName string, version utils.Version) error { - instanceBinPath, err := tiupexec.PrepareBinary(componentName, version, inst.BinPath) +func (inst *instance) PrepareBinary(binaryName string, componentName string, version utils.Version) error { + instanceBinPath, err := tiupexec.PrepareBinary(binaryName, version, inst.BinPath) if err != nil { return err } diff --git a/components/playground/playground.go b/components/playground/playground.go index 73fe009ad5..ae15ae9646 100644 --- a/components/playground/playground.go +++ b/components/playground/playground.go @@ -514,7 +514,7 @@ func (p *Playground) startInstance(ctx context.Context, inst instance.Instance) return err } - if err := inst.PrepareBinary(component, version); err != nil { + if err := inst.PrepareBinary(component, inst.Component(), version); err != nil { return err } diff --git a/tests/tiup-playground/test_playground.sh b/tests/tiup-playground/test_playground.sh index dd431b41de..c273da4bb3 100755 --- a/tests/tiup-playground/test_playground.sh +++ b/tests/tiup-playground/test_playground.sh @@ -66,7 +66,7 @@ trap "kill_all" EXIT # wait start cluster successfully n=0 -while [ "$n" -lt 300 ] && ! grep -q "TiDB Playground Cluster is started" $outfile; do +while [ "$n" -lt 600 ] && ! grep -q "TiDB Playground Cluster is started" $outfile; do n=$(( n + 1 )) sleep 1 done