Fix flaky test TestPeerPoolSimulationSuite/TestSingleTopicDiscoveryWithFailover

This commit is contained in:
Adrià Cidre 2018-05-21 17:13:46 +02:00 committed by Dmitry Shulyak
parent 06e64cdde2
commit ace175ba69
1 changed files with 1 additions and 1 deletions

View File

@ -166,13 +166,13 @@ func (s *PeerPoolSimulationSuite) TestSingleTopicDiscoveryWithFailover() {
s.Equal(signal.EventDiscoveryStarted, s.getPoolEvent(poolEvents))
s.Require().NotNil(s.peers[1].DiscV5)
register = NewRegister(topic)
s.Require().NoError(register.Start(s.peers[2]))
defer register.Stop()
s.Equal(s.peers[2].Self().ID, s.getPeerFromEvent(events, p2p.PeerEventTypeAdd))
s.Equal(signal.EventDiscoveryStopped, s.getPoolEvent(poolEvents))
s.Require().Equal(signal.EventDiscoverySummary, s.getPoolEvent(poolEvents))
summary = <-summaries
s.Len(summary, 1)