Fix flaky test TestPeerPoolSimulationSuite/TestSingleTopicDiscoveryWithFailover
This commit is contained in:
parent
06e64cdde2
commit
ace175ba69
|
@ -166,13 +166,13 @@ func (s *PeerPoolSimulationSuite) TestSingleTopicDiscoveryWithFailover() {
|
||||||
|
|
||||||
s.Equal(signal.EventDiscoveryStarted, s.getPoolEvent(poolEvents))
|
s.Equal(signal.EventDiscoveryStarted, s.getPoolEvent(poolEvents))
|
||||||
s.Require().NotNil(s.peers[1].DiscV5)
|
s.Require().NotNil(s.peers[1].DiscV5)
|
||||||
register = NewRegister(topic)
|
|
||||||
s.Require().NoError(register.Start(s.peers[2]))
|
s.Require().NoError(register.Start(s.peers[2]))
|
||||||
defer register.Stop()
|
defer register.Stop()
|
||||||
s.Equal(s.peers[2].Self().ID, s.getPeerFromEvent(events, p2p.PeerEventTypeAdd))
|
s.Equal(s.peers[2].Self().ID, s.getPeerFromEvent(events, p2p.PeerEventTypeAdd))
|
||||||
|
|
||||||
s.Equal(signal.EventDiscoveryStopped, s.getPoolEvent(poolEvents))
|
s.Equal(signal.EventDiscoveryStopped, s.getPoolEvent(poolEvents))
|
||||||
s.Require().Equal(signal.EventDiscoverySummary, s.getPoolEvent(poolEvents))
|
s.Require().Equal(signal.EventDiscoverySummary, s.getPoolEvent(poolEvents))
|
||||||
|
|
||||||
summary = <-summaries
|
summary = <-summaries
|
||||||
s.Len(summary, 1)
|
s.Len(summary, 1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue