improve flaky TestMailServerPeersDiscovery (#1120)

This commit is contained in:
Adam Babik 2018-07-27 11:50:26 +02:00 committed by GitHub
parent 60249e4682
commit 82a709fbc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -513,7 +513,9 @@ func (s *PeerPoolSimulationSuite) TestMailServerPeersDiscovery() {
s.Require().Len(cachedPeers, 1)
s.Equal(s.peers[0].Self().ID[:], cachedPeers[0].ID[:])
// wait for another summary event as the peer should be removed
// wait for another event as the peer should be removed
disconnectedPeer := s.getPeerFromEvent(events, p2p.PeerEventTypeDrop)
s.Equal(s.peers[0].Self().ID, disconnectedPeer)
s.Equal(signal.EventDiscoverySummary, s.getPoolEvent(poolEvents))
s.Len(<-summaries, 0)
}