From 3e400a8ddd4b4f4ba8e4639f5ee07e81b903f828 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 2 Dec 2025 10:04:22 +0100 Subject: [PATCH] inlet/kafka: be more lenient about test for load balancing Require just a few messages in each partition. --- inlet/kafka/root_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inlet/kafka/root_test.go b/inlet/kafka/root_test.go index 3013683c..94daf28c 100644 --- a/inlet/kafka/root_test.go +++ b/inlet/kafka/root_test.go @@ -163,7 +163,7 @@ func TestLoadBalancingAlgorithm(t *testing.T) { switch algo { case LoadBalanceRandom: for p, count := range messages { - if count > total/len(messages)*6/10 && count < total/len(messages)*14/10 { + if count > total/len(messages)*2/10 && count < total/len(messages)*18/10 { expected[p] = count } else { expected[p] = total / len(messages)