diff options
Diffstat (limited to 'weed/mq/pub_balancer/allocate_test.go')
| -rw-r--r-- | weed/mq/pub_balancer/allocate_test.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/weed/mq/pub_balancer/allocate_test.go b/weed/mq/pub_balancer/allocate_test.go index 63692af0f..fc747634e 100644 --- a/weed/mq/pub_balancer/allocate_test.go +++ b/weed/mq/pub_balancer/allocate_test.go @@ -4,6 +4,7 @@ import ( "fmt" cmap "github.com/orcaman/concurrent-map/v2" "github.com/seaweedfs/seaweedfs/weed/pb/mq_pb" + "github.com/seaweedfs/seaweedfs/weed/pb/schema_pb" "github.com/stretchr/testify/assert" "testing" ) @@ -29,7 +30,7 @@ func Test_allocateOneBroker(t *testing.T) { wantAssignments: []*mq_pb.BrokerPartitionAssignment{ { LeaderBroker: "localhost:17777", - Partition: &mq_pb.Partition{ + Partition: &schema_pb.Partition{ RingSize: MaxPartitionCount, RangeStart: 0, RangeStop: MaxPartitionCount, @@ -96,7 +97,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) { assignments: []*mq_pb.BrokerPartitionAssignment{ { LeaderBroker: "", - Partition: &mq_pb.Partition{}, + Partition: &schema_pb.Partition{}, FollowerBroker: "localhost:2", }, }, @@ -111,7 +112,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) { assignments: []*mq_pb.BrokerPartitionAssignment{ { LeaderBroker: "localhost:1", - Partition: &mq_pb.Partition{}, + Partition: &schema_pb.Partition{}, FollowerBroker: "", }, }, @@ -126,7 +127,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) { assignments: []*mq_pb.BrokerPartitionAssignment{ { LeaderBroker: "localhost:1", - Partition: &mq_pb.Partition{}, + Partition: &schema_pb.Partition{}, FollowerBroker: "localhost:200", }, }, @@ -141,7 +142,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) { assignments: []*mq_pb.BrokerPartitionAssignment{ { LeaderBroker: "localhost:100", - Partition: &mq_pb.Partition{}, + Partition: &schema_pb.Partition{}, FollowerBroker: "localhost:200", }, }, @@ -156,7 +157,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) { assignments: []*mq_pb.BrokerPartitionAssignment{ { LeaderBroker: "localhost:1", - Partition: &mq_pb.Partition{}, + Partition: &schema_pb.Partition{}, FollowerBroker: "localhost:2", }, }, @@ -171,7 +172,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) { assignments: []*mq_pb.BrokerPartitionAssignment{ { LeaderBroker: "localhost:1", - Partition: &mq_pb.Partition{}, + Partition: &schema_pb.Partition{}, }, }, }, @@ -185,7 +186,7 @@ func TestEnsureAssignmentsToActiveBrokersX(t *testing.T) { assignments: []*mq_pb.BrokerPartitionAssignment{ { LeaderBroker: "localhost:1", - Partition: &mq_pb.Partition{}, + Partition: &schema_pb.Partition{}, FollowerBroker: "localhost:2", }, }, |
