Skip to content

Commit c078a03

Browse files
Fixing gossip Stop on z
When gossip service instantiated and stopped right after that, it cause the probem with one of WaitGroups - its Wait method called before any of Add called. So, we add in test some time between gossip service instantiation and its Stop. Change-Id: Ib9ad6ad855f81c6cfeb83f03f2e3506bd0ddc1a0 Signed-off-by: Gennady Laventman <[email protected]>
1 parent 0a6570f commit c078a03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gossip/service/gossip_service_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import (
2222
"sync"
2323
"testing"
2424

25+
"time"
26+
2527
"github.com/hyperledger/fabric/gossip/api"
2628
"github.com/hyperledger/fabric/msp/mgmt"
2729
"github.com/hyperledger/fabric/msp/mgmt/testtools"
@@ -59,6 +61,8 @@ func TestInitGossipService(t *testing.T) {
5961
assert.Equal(t, gossip, GetGossipService())
6062
}(gossip)
6163
}
64+
65+
time.Sleep(time.Second * 2)
6266
}
6367

6468
// Make sure *joinChannelMessage implements the api.JoinChannelMessage

0 commit comments

Comments
 (0)