From c10bd1e5709a7b47729b445bc98f2e41bc7cc0a8 Mon Sep 17 00:00:00 2001 From: Mark Hindess Date: Thu, 3 Aug 2023 14:42:36 +0100 Subject: [PATCH] fix(test): test timing error Signed-off-by: Mark Hindess --- broker_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/broker_test.go b/broker_test.go index 186e92d16..928e19b3e 100644 --- a/broker_test.go +++ b/broker_test.go @@ -1484,8 +1484,8 @@ func Test_handleThrottledResponse(t *testing.T) { t.Run(tt.name, func(t *testing.T) { broker.metricRegistry = metrics.NewRegistry() broker.brokerThrottleTime = broker.registerHistogram("throttle-time-in-ms") - broker.handleThrottledResponse(tt.response) startTime := time.Now() + broker.handleThrottledResponse(tt.response) broker.waitIfThrottled() if tt.expectDelay { if time.Since(startTime) < throttleTime {