Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

playground: fix name display for pd ms service #2471

Merged
merged 2 commits into from
Nov 11, 2024
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
6 changes: 3 additions & 3 deletions components/playground/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion components/playground/playground.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion tests/tiup-playground/test_playground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading