generation-aware playback statuses
This commit is contained in:
@@ -1,11 +1,22 @@
|
||||
package playback
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestGenerationContext(t *testing.T) {
|
||||
if got := generationFromContext(context.Background()); got != 0 {
|
||||
t.Fatalf("background generation = %d, want 0", got)
|
||||
}
|
||||
ctx := withGeneration(context.Background(), 42)
|
||||
if got := generationFromContext(ctx); got != 42 {
|
||||
t.Fatalf("generation = %d, want 42", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStatusPreservesValues(t *testing.T) {
|
||||
wantErr := errors.New("producer missing")
|
||||
status := Status{
|
||||
|
||||
Reference in New Issue
Block a user