Skip to content

Commit

Permalink
Fix flaky etcdraft test by installing chaincode serially
Browse files Browse the repository at this point in the history
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
  • Loading branch information
Brett Logan authored and denyeart committed Dec 17, 2019
1 parent b4b0191 commit 3a9b5e3
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions integration/e2e/etcdraft_reconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"syscall"
"time"

"github.com/fsouza/go-dockerclient"
docker "github.com/fsouza/go-dockerclient"
"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/integration/nwo"
"github.com/hyperledger/fabric/integration/nwo/commands"
Expand Down Expand Up @@ -1347,21 +1347,13 @@ func assertNoErrorsAreLogged(ordererRunners []*ginkgomon.Runner) {
}

func deployChaincodes(n *nwo.Network, p *nwo.Peer, o *nwo.Orderer, mycc nwo.Chaincode, mycc2 nwo.Chaincode, mycc3 nwo.Chaincode) {
var wg sync.WaitGroup
wg.Add(3)
for channel, chaincode := range map[string]nwo.Chaincode{
"testchannel": mycc,
"testchannel2": mycc2,
"testchannel3": mycc3,
} {
go func(channel string, cc nwo.Chaincode) {
defer GinkgoRecover()
defer wg.Done()
nwo.DeployChaincode(n, channel, o, cc, p)
}(channel, chaincode)
nwo.DeployChaincode(n, channel, o, chaincode, p)
}

wg.Wait()
}

func assertInvoke(network *nwo.Network, peer *nwo.Peer, o *nwo.Orderer, cc string, channel string, expectedOutput string, expectedStatus int) {
Expand Down

0 comments on commit 3a9b5e3

Please sign in to comment.