MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestBandwidth

Function TestBandwidth

internal/utils/ratelimit/bandwidth_test.go:12–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestBandwidth(t *testing.T) {
13 if !testutils.IsSingleTesting() {
14 return
15 }
16
17 var bandwidth = ratelimit.NewBandwidth(32 << 10)
18 bandwidth.Ack(context.Background(), 123)
19 bandwidth.Ack(context.Background(), 16 << 10)
20 bandwidth.Ack(context.Background(), 32 << 10)
21}
22
23func TestBandwidth_0(t *testing.T) {
24 var bandwidth = ratelimit.NewBandwidth(0)

Callers

nothing calls this directly

Calls 3

IsSingleTestingFunction · 0.92
NewBandwidthFunction · 0.92
AckMethod · 0.45

Tested by

no test coverage detected