Skip to content

Commit

Permalink
Nothing really new, just trying some more debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
markmandel committed Feb 13, 2020
1 parent 57051bc commit e15ce6a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (f *Framework) CreateGameServerAndWaitUntilReady(ns string, gs *agonesv1.Ga
return nil, fmt.Errorf("creating %v GameServer instances failed (%v): %v", gs.Spec, gs.Name, err)
}

logrus.WithField("name", newGs.ObjectMeta.Name).Info("GameServer created, waiting for Ready")
logrus.WithField("gs", newGs.ObjectMeta.Name).Info("GameServer created, waiting for Ready")

readyGs, err := f.WaitForGameServerState(newGs, agonesv1.GameServerStateReady, 5*time.Minute)

Expand All @@ -133,7 +133,7 @@ func (f *Framework) CreateGameServerAndWaitUntilReady(ns string, gs *agonesv1.Ga
return nil, fmt.Errorf("Ready GameServer instance has no port: %v", readyGs.Status)
}

logrus.WithField("name", newGs.ObjectMeta.Name).Info("GameServer Ready")
logrus.WithField("gs", newGs.ObjectMeta.Name).Info("GameServer Ready")

return readyGs, nil
}
Expand All @@ -143,7 +143,7 @@ func (f *Framework) WaitForGameServerState(gs *agonesv1.GameServer, state agones
timeout time.Duration) (*agonesv1.GameServer, error) {
var readyGs *agonesv1.GameServer

err := wait.PollImmediate(2*time.Second, timeout, func() (bool, error) {
err := wait.PollImmediate(1*time.Second, timeout, func() (bool, error) {
var err error
readyGs, err = f.AgonesClient.AgonesV1().GameServers(gs.Namespace).Get(gs.Name, metav1.GetOptions{})

Expand All @@ -152,6 +152,10 @@ func (f *Framework) WaitForGameServerState(gs *agonesv1.GameServer, state agones
return false, nil
}

logrus.WithField("gs", readyGs.ObjectMeta.Name).
WithField("currentState", readyGs.Status.State).
WithField("awaitingState", state).Info("Waiting for states to match")

if readyGs.Status.State == state {
return true, nil
}
Expand Down

0 comments on commit e15ce6a

Please sign in to comment.