(t *testing.T)
| 232 | } |
| 233 | |
| 234 | func popSinglePayload(t *testing.T) map[string]json.RawMessage { |
| 235 | t.Helper() |
| 236 | |
| 237 | items := PopOldest(10) |
| 238 | if len(items) != 1 { |
| 239 | t.Fatalf("PopOldest() items = %d, want 1", len(items)) |
| 240 | } |
| 241 | |
| 242 | var payload map[string]json.RawMessage |
| 243 | if err := json.Unmarshal(items[0], &payload); err != nil { |
| 244 | t.Fatalf("unmarshal payload: %v", err) |
| 245 | } |
| 246 | return payload |
| 247 | } |
| 248 | |
| 249 | func waitForSinglePayload(t *testing.T, timeout time.Duration) map[string]json.RawMessage { |
| 250 | t.Helper() |
no test coverage detected