Skip to content

Commit

Permalink
playground: fix name display for pd ms service (#2471)
Browse files Browse the repository at this point in the history
* playground: fix name display for pd ms service

Signed-off-by: xhe <xw897002528@gmail.com>

* fix CI

Signed-off-by: xhe <xw897002528@gmail.com>

---------

Signed-off-by: xhe <xw897002528@gmail.com>
  • Loading branch information
xhebox authored Nov 11, 2024
1 parent 235c85e commit c561ec9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit c561ec9

Please sign in to comment.