From e60d0e9297848004e97768cd947eca24a776e4d9 Mon Sep 17 00:00:00 2001 From: Giannis Gkiortzis <58184179+giortzisg@users.noreply.github.com> Date: Thu, 12 Mar 2026 10:48:23 +0100 Subject: [PATCH] fix: TestAsyncTransport_SendEnvelope flakiness The queue overflow testcase was using an unbuffered channel for RequestReceived, to block the worker so that no other events get consumed and the overflow will be guaranteed. The channel however was unbuffered, so the requestReceived (worker) could race with the test and block the main routine till timeout --- internal/http/transport_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/http/transport_test.go b/internal/http/transport_test.go index 555f7abdd..50105cfa1 100644 --- a/internal/http/transport_test.go +++ b/internal/http/transport_test.go @@ -192,7 +192,7 @@ func TestAsyncTransport_SendEnvelope(t *testing.T) { t.Run("queue overflow", func(t *testing.T) { blockChan := make(chan struct{}) - requestReceived := make(chan struct{}) + requestReceived := make(chan struct{}, 1) server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { select { case requestReceived <- struct{}{}: