Unverified Commit 9543fa2b authored by Jay Guo's avatar Jay Guo Committed by Artem Barger
Browse files

[FAB-14181] GinkgoRecover should be deferred directly



Change-Id: I7d5d3d70705668d18dfd5c4f1cc68b4d59573eda
Signed-off-by: default avatarJay Guo <guojiannan1101@gmail.com>
parent 4e612182
......@@ -395,10 +395,8 @@ func findLeader(ordererRunners []*ginkgomon.Runner) int {
for _, runner := range ordererRunners {
go func(runner *ginkgomon.Runner) {
defer func() {
GinkgoRecover()
wg.Done()
}()
defer GinkgoRecover()
defer wg.Done()
leader := findLeader(runner)
leaders <- leader
......
......@@ -540,10 +540,8 @@ func assertBlockReception(expectedHeightsPerChannel map[string]int, orderers []*
wg.Add(len(orderers))
for _, orderer := range orderers {
go func(orderer *nwo.Orderer) {
defer func() {
GinkgoRecover()
wg.Done()
}()
defer GinkgoRecover()
defer wg.Done()
waitForBlockReception(orderer, p, n, channelName, blockSeq)
}(orderer)
}
......@@ -555,10 +553,8 @@ func assertBlockReception(expectedHeightsPerChannel map[string]int, orderers []*
for channelName, blockSeq := range expectedHeightsPerChannel {
go func(channelName string, blockSeq int) {
defer func() {
GinkgoRecover()
wg.Done()
}()
defer GinkgoRecover()
defer wg.Done()
assertReception(channelName, blockSeq)
}(channelName, blockSeq)
}
......@@ -614,10 +610,8 @@ func assertNoErrorsAreLogged(ordererRunners []*ginkgomon.Runner) {
for _, runner := range ordererRunners {
go func(runner *ginkgomon.Runner) {
defer func() {
GinkgoRecover()
wg.Done()
}()
defer GinkgoRecover()
defer wg.Done()
assertNoErrors(runner)
}(runner)
}
......@@ -633,10 +627,8 @@ func deployChaincodes(n *nwo.Network, p *nwo.Peer, o *nwo.Orderer, mycc nwo.Chai
"testchannel3": mycc3,
} {
go func(channel string, cc nwo.Chaincode) {
defer func() {
GinkgoRecover()
wg.Done()
}()
defer GinkgoRecover()
defer wg.Done()
nwo.DeployChaincode(n, channel, o, cc, p)
}(channel, chaincode)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment