1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-06-26 04:18:59 +02:00

fix TestMisplacedChecking() and add test-case

This commit is contained in:
zehweh 2023-11-21 14:05:35 +01:00 committed by Chris Lu
parent f4cafc1dbc
commit d818ca9631

View file

@ -332,7 +332,10 @@ func TestMisplacedChecking(t *testing.T) {
location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn1"}},
},
{
location: &location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn2"}},
location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn2"}},
},
{
location: &location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn3"}},
},
},
expected: false,
@ -345,10 +348,13 @@ func TestMisplacedChecking(t *testing.T) {
location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn1"}},
},
{
location: &location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn2"}},
location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn2"}},
},
{
location: &location{"dc2", "r2", &master_pb.DataNodeInfo{Id: "dn3"}},
},
},
expected: false,
expected: true,
},
{
name: "test 100",