diff --git a/gossip/service/gossip_service_test.go b/gossip/service/gossip_service_test.go index af0a8060f52..1233a102ee2 100644 --- a/gossip/service/gossip_service_test.go +++ b/gossip/service/gossip_service_test.go @@ -50,7 +50,7 @@ import ( "google.golang.org/grpc" ) -const TIMEOUT = 45 * time.Second +const TIMEOUT = 90 * time.Second func init() { util.SetupTestLogging() @@ -611,7 +611,9 @@ func (jmc *joinChanMsg) AnchorPeersOf(org api.OrgIdentityType) []api.AnchorPeer } func waitForFullMembershipOrFailNow(t *testing.T, channel string, gossips []*gossipGRPC, peersNum int, timeout time.Duration, testPollInterval time.Duration) { - end := time.Now().Add(timeout) + logger.Warning("Waiting for", peersNum, "members") + start := time.Now() + end := start.Add(timeout) var correctPeers int for time.Now().Before(end) { correctPeers = 0 @@ -621,6 +623,7 @@ func waitForFullMembershipOrFailNow(t *testing.T, channel string, gossips []*gos } } if correctPeers == peersNum { + logger.Warning("Established full channel membership in", time.Since(start)) return } time.Sleep(testPollInterval) diff --git a/gossip/service/integration_test.go b/gossip/service/integration_test.go index d94634326c3..dc4200bb94b 100644 --- a/gossip/service/integration_test.go +++ b/gossip/service/integration_test.go @@ -104,7 +104,7 @@ func TestLeaderYield(t *testing.T) { // Add peers to the channel addPeersToChannel(channelName, gossips, peerIndexes) // Prime the membership view of the peers - waitForFullMembershipOrFailNow(t, channelName, gossips, n, time.Second*30, time.Millisecond*100) + waitForFullMembershipOrFailNow(t, channelName, gossips, n, TIMEOUT, time.Millisecond*100) store := newTransientStore(t) defer store.tearDown()