edge cases for broker assignment

This commit is contained in:
chrislu
2024-03-07 10:45:38 -08:00
parent 33ab6cfcf7
commit 49869eec83
2 changed files with 23 additions and 9 deletions

View File

@@ -209,6 +209,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{