diff --git a/core/chaincode/exectransaction_test.go b/core/chaincode/exectransaction_test.go index b00eaff34d9..7b60fd864bc 100644 --- a/core/chaincode/exectransaction_test.go +++ b/core/chaincode/exectransaction_test.go @@ -1812,7 +1812,7 @@ func setupTestConfig() { // Set the number of maxprocs var numProcsDesired = viper.GetInt("peer.gomaxprocs") - chaincodeLogger.Debugf("setting Number of procs to %d, was %d\n", numProcsDesired, runtime.GOMAXPROCS(2)) + chaincodeLogger.Debugf("setting Number of procs to %d, was %d\n", numProcsDesired, runtime.GOMAXPROCS(numProcsDesired)) // Init the BCCSP err = factory.InitFactories(nil) diff --git a/core/endorser/endorser_test.go b/core/endorser/endorser_test.go index 3e83dc9a33d..77fcb74cf20 100644 --- a/core/endorser/endorser_test.go +++ b/core/endorser/endorser_test.go @@ -22,6 +22,7 @@ import ( "io/ioutil" "net" "os" + "runtime" "strings" "testing" "time" @@ -750,7 +751,7 @@ func setupTestConfig() { testutil.SetupTestLogging() // Set the number of maxprocs - viper.GetInt("peer.gomaxprocs") + runtime.GOMAXPROCS(viper.GetInt("peer.gomaxprocs")) // Init the BCCSP var bccspConfig *factory.FactoryOpts diff --git a/core/testutil/config.go b/core/testutil/config.go index b872339f84a..1c447850596 100644 --- a/core/testutil/config.go +++ b/core/testutil/config.go @@ -83,7 +83,7 @@ func SetupTestConfig() { // Set the number of maxprocs var numProcsDesired = viper.GetInt("peer.gomaxprocs") - configLogger.Debugf("setting Number of procs to %d, was %d\n", numProcsDesired, runtime.GOMAXPROCS(2)) + configLogger.Debugf("setting Number of procs to %d, was %d\n", numProcsDesired, runtime.GOMAXPROCS(numProcsDesired)) // Init the BCCSP var bccspConfig *factory.FactoryOpts