Skip to content

Commit

Permalink
[FAB-12054] Retry Operation in TestInvalidChannel
Browse files Browse the repository at this point in the history
Test TestInvalidChannel fails intermittently on ppc64le,
leveraging Eventually() and thus retry.

Change-Id: I0887a15f2bcd813fe624ada1558093d945d96d40
Signed-off-by: Krishna Harsha Voora <krishvoor@in.ibm.com>
  • Loading branch information
krishvoor committed Sep 19, 2018
1 parent 0983a3c commit bcf8736
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions orderer/common/cluster/comm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@ func TestInvalidChannel(t *testing.T) {
defer node1.stop()

node1.c.Configure(testChannel, []cluster.RemoteNode{node1.nodeInfo})
gt := gomega.NewGomegaWithT(t)
gt.Eventually(func() (bool, error) {
_, err := node1.c.Remote(testChannel, node1.nodeInfo.ID)
return true, err
}).Should(gomega.BeTrue())

stub, err := node1.c.Remote(testChannel, node1.nodeInfo.ID)
assert.NoError(t, err)
// An empty StepRequest has an empty channel which is invalid
Expand Down

0 comments on commit bcf8736

Please sign in to comment.