Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions storage/postgres/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,10 @@ func TestEncodedStorageRoundTrips(t *testing.T) {
if claims, err := b.DequeueBatch(ctx, "go", 10, 0, nil); err != nil || len(claims) != 0 {
t.Fatalf("plain claim took %d, %v", len(claims), err)
}
// No encodings claim nothing, even with an activity waiting.
if none, err := b.DequeueBatchEncoded(ctx, "ts", 10, 0, nil, nil); err != nil || len(none) != 0 {
t.Fatalf("no encodings claimed %d, %v", len(none), err)
}
claims, err := b.DequeueBatchEncoded(ctx, "ts", 10, 0, nil, []string{"json-v1", "superjson-v1"})
if err != nil || len(claims) != 1 {
t.Fatalf("encoded claim: %d, %v", len(claims), err)
Expand All @@ -625,11 +629,6 @@ func TestEncodedStorageRoundTrips(t *testing.T) {
if c.Activity.ID != native.ID || c.Activity.Serialization != "superjson-v1" {
t.Fatalf("claimed %+v", c.Activity)
}
// Only the encodings asked for: none claims nothing, and plain JSON isn't
// implied.
if none, err := b.DequeueBatchEncoded(ctx, "ts", 10, 0, nil, nil); err != nil || len(none) != 0 {
t.Fatalf("no encodings claimed %d, %v", len(none), err)
}

checkpoint := uuid.New()
step := storage.ActivityResult{Data: json.RawMessage(`{"json":1}`), State: storage.ResultOk, Serialization: "superjson-v1"}
Expand Down
Loading