test(multiplayer): verify two-player proposal round trip

This commit is contained in:
Josh Creek
2026-09-01 15:17:53 +01:00
parent 1e1db3525e
commit aa93aeec95
9 changed files with 369 additions and 3 deletions
+4
View File
@@ -47,6 +47,7 @@ type Worker struct {
Now func() time.Time
NextID func() string
Prepare PrepareFunc
OnError func(error)
}
// Run polls until cancellation. A failed attempt is returned so a supervisor
@@ -57,6 +58,9 @@ func (w Worker) Run(ctx context.Context, interval time.Duration) error {
}
for {
if _, err := w.RunOnce(ctx); err != nil {
if w.OnError != nil {
w.OnError(err)
}
if errors.Is(err, ErrWorkerNotConfigured) || errors.Is(err, ErrUnsupportedPlaylist) || errors.Is(err, ErrInvalidMatcherSize) {
return err
}