Skip to content

Commit

Permalink
Make BCCSP stop complaining in gossip tests
Browse files Browse the repository at this point in the history
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 <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Mar 2, 2017
1 parent cde2640 commit 54f6a82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gossip/gossip/gossip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"testing"
"time"

"github.com/hyperledger/fabric/bccsp/factory"
"github.com/hyperledger/fabric/gossip/api"
"github.com/hyperledger/fabric/gossip/comm"
"github.com/hyperledger/fabric/gossip/common"
Expand All @@ -49,9 +50,8 @@ func init() {
discovery.SetAliveExpirationCheckInterval(aliveTimeInterval)
discovery.SetAliveExpirationTimeout(aliveTimeInterval * 10)
discovery.SetReconnectInterval(aliveTimeInterval * 5)

testWG.Add(7)

factory.InitFactories(nil)
}

var orgInChannelA = api.OrgIdentityType("ORG1")
Expand Down

0 comments on commit 54f6a82

Please sign in to comment.