Skip to content

Commit 54f6a82

Browse files
committed
Make BCCSP stop complaining in gossip tests
BCCSP is logging the following message: [BCCSP_FACTORY] GetDefault -> WARN 29a Before using BCCSP,\ please call InitFactories(). Falling back to bootBCCSP. If it is not initialized manually. Gossip uses BCCSP's hash so when running the intensive gossip_test, there are lots of BCCSP log entries logged. I added a line that initializes the BCCSP to prevent this. Change-Id: I1dd19794ced995f6cd3699d35aa138511267e9c4 Signed-off-by: Yacov Manevich <[email protected]>
1 parent cde2640 commit 54f6a82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gossip/gossip/gossip_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"testing"
2929
"time"
3030

31+
"github.com/hyperledger/fabric/bccsp/factory"
3132
"github.com/hyperledger/fabric/gossip/api"
3233
"github.com/hyperledger/fabric/gossip/comm"
3334
"github.com/hyperledger/fabric/gossip/common"
@@ -49,9 +50,8 @@ func init() {
4950
discovery.SetAliveExpirationCheckInterval(aliveTimeInterval)
5051
discovery.SetAliveExpirationTimeout(aliveTimeInterval * 10)
5152
discovery.SetReconnectInterval(aliveTimeInterval * 5)
52-
5353
testWG.Add(7)
54-
54+
factory.InitFactories(nil)
5555
}
5656

5757
var orgInChannelA = api.OrgIdentityType("ORG1")

0 commit comments

Comments
 (0)