Skip to content

Commit

Permalink
use WaitForTabletStatuses
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
  • Loading branch information
frouioui committed Sep 13, 2023
1 parent 50b2a37 commit b8ef696
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions go/test/endtoend/cluster/vttablet_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (vttablet *VttabletProcess) Setup() (err error) {
}()

if vttablet.ServingStatus != "" {
if err = vttablet.WaitForTabletStatus(vttablet.ServingStatus, "SERVING"); err != nil {
if err = vttablet.WaitForTabletStatuses([]string{"SERVING", "NOT_SERVING"}); err != nil {
errFileContent, _ := os.ReadFile(fname)
if errFileContent != nil {
log.Infof("vttablet error:\n%s\n", string(errFileContent))
Expand Down Expand Up @@ -273,8 +273,8 @@ func (vttablet *VttabletProcess) GetTabletType() string {
}

// WaitForTabletStatus waits for one of the expected statuses to be reached
func (vttablet *VttabletProcess) WaitForTabletStatus(expectedStatus ...string) error {
return vttablet.WaitForTabletStatusesForTimeout(expectedStatus, vttabletStateTimeout)
func (vttablet *VttabletProcess) WaitForTabletStatus(expectedStatus string) error {
return vttablet.WaitForTabletStatusesForTimeout([]string{expectedStatus}, vttabletStateTimeout)
}

// WaitForTabletStatuses waits for one of expected statuses is reached
Expand Down

0 comments on commit b8ef696

Please sign in to comment.