MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / popSinglePayload

Function popSinglePayload

internal/redisqueue/plugin_test.go:234–247  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

232}
233
234func 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
249func waitForSinglePayload(t *testing.T, timeout time.Duration) map[string]json.RawMessage {
250 t.Helper()

Calls 1

PopOldestFunction · 0.85

Tested by

no test coverage detected