MCPcopy Create free account
hub / github.com/PasarGuard/node / TestStatsTracker_UpdateStatsBatchEmptyNoop

Function TestStatsTracker_UpdateStatsBatchEmptyNoop

pkg/stats/tracker_test.go:330–341  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

328}
329
330func TestStatsTracker_UpdateStatsBatchEmptyNoop(t *testing.T) {
331 tracker := New()
332 ctx := context.Background()
333
334 tracker.UpdateStatsBatch(nil)
335 tracker.UpdateStatsBatch([]Sample{})
336
337 resp := tracker.GetUsersStats(ctx, false)
338 if len(resp.Stats) != 0 {
339 t.Fatalf("expected 0 stats after empty batch updates, got %d", len(resp.Stats))
340 }
341}

Callers

nothing calls this directly

Calls 3

UpdateStatsBatchMethod · 0.80
NewFunction · 0.70
GetUsersStatsMethod · 0.45

Tested by

no test coverage detected