Skip to content

Commit

Permalink
fix TestBackoff
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryRomanov committed Feb 1, 2024
1 parent 099cc65 commit ad1526d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ require (
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
github.com/alicebob/miniredis/v2 v2.30.5
github.com/bitly/go-simplejson v0.5.1
github.com/cespare/xxhash/v2 v2.2.0
github.com/cenkalti/backoff/v3 v3.0.0
github.com/cenkalti/backoff/v4 v4.2.1
github.com/cespare/xxhash/v2 v2.2.0
github.com/euank/go-kmsg-parser v2.0.0+incompatible
github.com/go-redis/redis v6.15.9+incompatible
github.com/golang/mock v1.6.0
Expand Down Expand Up @@ -51,7 +50,6 @@ require (
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v3 v3.0.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cilium/ebpf v0.9.1 // indirect
github.com/containerd/cgroups/v3 v3.0.1 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
Expand Down
4 changes: 2 additions & 2 deletions pipeline/backoff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestBackoff(t *testing.T) {

batcherBackoff := NewRetriableBatcher(
&BatcherOptions{
MetricCtl: metric.New("", prometheus.NewRegistry()),
MetricCtl: metric.NewCtl("", prometheus.NewRegistry()),
},
func(workerData *WorkerData, batch *Batch) error {
eventCount.Inc()
Expand All @@ -48,7 +48,7 @@ func TestBackoffWithError(t *testing.T) {

batcherBackoff := NewRetriableBatcher(
&BatcherOptions{
MetricCtl: metric.New("", prometheus.NewRegistry()),
MetricCtl: metric.NewCtl("", prometheus.NewRegistry()),
},
func(workerData *WorkerData, batch *Batch) error {
return errors.New("some error")
Expand Down

0 comments on commit ad1526d

Please sign in to comment.