mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 04:36:51 +08:00
fix tests
This commit is contained in:
@@ -97,9 +97,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) {
|
|||||||
{
|
{
|
||||||
LeaderBroker: "",
|
LeaderBroker: "",
|
||||||
Partition: &mq_pb.Partition{},
|
Partition: &mq_pb.Partition{},
|
||||||
FollowerBrokers: []string{
|
FollowerBroker: "localhost:2",
|
||||||
"localhost:2",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -114,9 +112,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) {
|
|||||||
{
|
{
|
||||||
LeaderBroker: "localhost:1",
|
LeaderBroker: "localhost:1",
|
||||||
Partition: &mq_pb.Partition{},
|
Partition: &mq_pb.Partition{},
|
||||||
FollowerBrokers: []string{
|
FollowerBroker: "",
|
||||||
"",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -131,9 +127,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) {
|
|||||||
{
|
{
|
||||||
LeaderBroker: "localhost:1",
|
LeaderBroker: "localhost:1",
|
||||||
Partition: &mq_pb.Partition{},
|
Partition: &mq_pb.Partition{},
|
||||||
FollowerBrokers: []string{
|
FollowerBroker: "localhost:200",
|
||||||
"localhost:200",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -148,43 +142,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) {
|
|||||||
{
|
{
|
||||||
LeaderBroker: "localhost:100",
|
LeaderBroker: "localhost:100",
|
||||||
Partition: &mq_pb.Partition{},
|
Partition: &mq_pb.Partition{},
|
||||||
FollowerBrokers: []string{
|
FollowerBroker: "localhost:200",
|
||||||
"localhost:200",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hasChanges: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "test missing two followers",
|
|
||||||
args: args{
|
|
||||||
activeBrokers: activeBrokers,
|
|
||||||
followerCount: 3,
|
|
||||||
assignments: []*mq_pb.BrokerPartitionAssignment{
|
|
||||||
{
|
|
||||||
LeaderBroker: "localhost:1",
|
|
||||||
Partition: &mq_pb.Partition{},
|
|
||||||
FollowerBrokers: []string{
|
|
||||||
"localhost:2",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hasChanges: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "test missing some followers",
|
|
||||||
args: args{
|
|
||||||
activeBrokers: activeBrokers,
|
|
||||||
followerCount: 10,
|
|
||||||
assignments: []*mq_pb.BrokerPartitionAssignment{
|
|
||||||
{
|
|
||||||
LeaderBroker: "localhost:1",
|
|
||||||
Partition: &mq_pb.Partition{},
|
|
||||||
FollowerBrokers: []string{
|
|
||||||
"localhost:2",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -199,9 +157,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) {
|
|||||||
{
|
{
|
||||||
LeaderBroker: "localhost:1",
|
LeaderBroker: "localhost:1",
|
||||||
Partition: &mq_pb.Partition{},
|
Partition: &mq_pb.Partition{},
|
||||||
FollowerBrokers: []string{
|
FollowerBroker: "localhost:2",
|
||||||
"localhost:2",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -230,9 +186,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) {
|
|||||||
{
|
{
|
||||||
LeaderBroker: "localhost:1",
|
LeaderBroker: "localhost:1",
|
||||||
Partition: &mq_pb.Partition{},
|
Partition: &mq_pb.Partition{},
|
||||||
FollowerBrokers: []string{
|
FollowerBroker: "localhost:2",
|
||||||
"localhost:2",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user