mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-11 22:14:02 +01:00
inlet/kafka: be more lenient about test for load balancing
Require just a few messages in each partition.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user