automatic playlist timing into PlaylistController
This commit is contained in:
@@ -173,7 +173,7 @@ func TestPlaylistControllerCommitsStateAfterSessionDelivery(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
result := make(chan error, 1)
|
||||
go func() { result <- controller.Run(ctx, commands) }()
|
||||
go func() { result <- controller.Run(ctx, commands, nil) }()
|
||||
|
||||
waitForPlaylistSnapshot(t, controller, func(snapshot PlaylistSnapshot) bool {
|
||||
return !snapshot.State.HasSelection
|
||||
@@ -224,7 +224,7 @@ func TestPlaylistControllerCancellationWhileSending(t *testing.T) {
|
||||
commands := make(chan PlaylistCommand, 1)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
result := make(chan error, 1)
|
||||
go func() { result <- controller.Run(ctx, commands) }()
|
||||
go func() { result <- controller.Run(ctx, commands, nil) }()
|
||||
|
||||
commands <- PlaylistCommand{Kind: PlaylistNext}
|
||||
cancel()
|
||||
@@ -323,7 +323,7 @@ func startPlaylistController(
|
||||
commands := make(chan PlaylistCommand, 64)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
result := make(chan error, 1)
|
||||
go func() { result <- controller.Run(ctx, commands) }()
|
||||
go func() { result <- controller.Run(ctx, commands, nil) }()
|
||||
return controller, commands, sessions, cancel, result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user