diff --git a/testclient_test.go b/testclient_test.go index f67890c..cc95077 100644 --- a/testclient_test.go +++ b/testclient_test.go @@ -535,11 +535,17 @@ func (c *TestClient) RunUntilJoined(ctx context.Context, hello ...*HelloServerMe if err := c.checkSingleMessageJoined(message); err != nil { return err } + found := false for idx, h := range hello { if err := c.checkMessageJoined(message, h); err == nil { hello = append(hello[:idx], hello[idx+1:]...) + found = true + break } } + if !found { + return fmt.Errorf("expected one of the passed hello sessions, got %+v", message.Event.Join[0]) + } } } return nil