mailgun / gubernator

High Performance Rate Limiting MicroService and Library
Apache License 2.0
964 stars 99 forks source link

Flaky test: `TestPeerClientShutdown` #222

Closed miparnisari closed 6 months ago

miparnisari commented 7 months ago

Seen in https://github.com/mailgun/gubernator/actions/runs/7964356658/job/21741729486?pr=201

=== RUN   TestPeerClientShutdown
=== RUN   TestPeerClientShutdown/No_batching
=== RUN   TestPeerClientShutdown/Batching
=== RUN   TestPeerClientShutdown/Global
panic: send on closed channel

goroutine 3981 [running]:
github.com/mailgun/gubernator/v2.(*PeerClient).getPeerRateLimitsBatch(0xc001041d00, {0x2f266e8, 0xc000060168}, 0xc0000eb580)
    /home/runner/work/gubernator/gubernator/peer_client.go:322 +0x6aa
github.com/mailgun/gubernator/v2.(*PeerClient).GetPeerRateLimit(0xc001041d00, {0x2f266e8, 0xc000060168}, 0xc0000eb580)
    /home/runner/work/gubernator/gubernator/peer_client.go:199 +0x6e5
github.com/mailgun/gubernator/v2_test.TestPeerClientShutdown.func1.1()
    /home/runner/work/gubernator/gubernator/peer_client_test.go:71 +0x1b0
created by github.com/mailgun/gubernator/v2_test.TestPeerClientShutdown.func1
    /home/runner/work/gubernator/gubernator/peer_client_test.go:68 +0x525
exit status 2
FAIL    github.com/mailgun/gubernator/v2    4.212s
Error: Process completed with exit code 1.