From ce9ee0567294b4f01e311ce2519504c6974aa3d3 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 186e92d160..928e19b3e4 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 {