rollback old change & add new
This commit is contained in:
parent
7d285ed7fd
commit
4c51cc9329
1 changed files with 6 additions and 2 deletions
|
@ -95,14 +95,18 @@ func TestGossip_TwoPeers(t *testing.T) {
|
|||
require.Contains(t, members1, peer0.Addr())
|
||||
require.Contains(t, members1, peer1.Addr())
|
||||
|
||||
peer0.UpdateMeta(&meshpb.PeerMeta{Name: "bob"})
|
||||
peer1.UpdateMeta(&meshpb.PeerMeta{Name: "bob"})
|
||||
time.Sleep(waitPeriod)
|
||||
require.Equal(t, "bob", peer1.GetMembers()[peer0.Addr()].Name)
|
||||
require.Equal(t, "bob", peer0.GetMembers()[peer1.Addr()].Name)
|
||||
|
||||
peer1.UpdateMeta(&meshpb.PeerMeta{Name: "sam"})
|
||||
time.Sleep(waitPeriod)
|
||||
require.Equal(t, "sam", peer0.GetMembers()[peer1.Addr()].Name)
|
||||
|
||||
peer0.UpdateMeta(&meshpb.PeerMeta{Name: "alice"})
|
||||
time.Sleep(waitPeriod)
|
||||
require.Equal(t, "alice", peer1.GetMembers()[peer0.Addr()].Name)
|
||||
|
||||
stop1()
|
||||
time.Sleep(waitPeriod)
|
||||
|
||||
|
|
Loading…
Reference in a new issue