aboutsummaryrefslogtreecommitdiff
path: root/weed/mq/pub_balancer/allocate_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mq/pub_balancer/allocate_test.go')
-rw-r--r--weed/mq/pub_balancer/allocate_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/weed/mq/pub_balancer/allocate_test.go b/weed/mq/pub_balancer/allocate_test.go
index b585219dc..5f6342e99 100644
--- a/weed/mq/pub_balancer/allocate_test.go
+++ b/weed/mq/pub_balancer/allocate_test.go
@@ -210,6 +210,20 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) {
hasChanges: false,
},
{
+ name: "test low active brokers with one follower",
+ args: args{
+ activeBrokers: lowActiveBrokers,
+ followerCount: 1,
+ assignments: []*mq_pb.BrokerPartitionAssignment{
+ {
+ LeaderBroker: "localhost:1",
+ Partition: &mq_pb.Partition{},
+ },
+ },
+ },
+ hasChanges: true,
+ },
+ {
name: "test single active broker",
args: args{
activeBrokers: singleActiveBroker,