diff --git a/management/server/management_proto_test.go b/management/server/management_proto_test.go index 8b51507bc..dde353b95 100644 --- a/management/server/management_proto_test.go +++ b/management/server/management_proto_test.go @@ -255,12 +255,12 @@ func Test_SyncProtocol(t *testing.T) { // expired peers come separately. if len(networkMap.GetOfflinePeers()) != 2 { - t.Fatal("expecting SyncResponse to have NetworkMap with 1 offline peer") + t.Fatal("expecting SyncResponse to have NetworkMap with 2 offline peer") } expiredPeerPubKey := "RlSy2vzoG2HyMBTUImXOiVhCBiiBa5qD5xzMxkiFDW4=" - if networkMap.GetOfflinePeers()[0].WgPubKey != expiredPeerPubKey { - t.Fatalf("expecting SyncResponse to have NetworkMap with 1 offline peer with a key %s", expiredPeerPubKey) + if !(networkMap.GetOfflinePeers()[0].WgPubKey == expiredPeerPubKey || networkMap.GetOfflinePeers()[1].WgPubKey == expiredPeerPubKey) { + t.Fatalf("expecting SyncResponse to have NetworkMap with 2 offline peer with a key %s", expiredPeerPubKey) } if networkMap.GetPeerConfig() == nil {