Skip to content

Commit

Permalink
[FAB-11966] TestShutdown intermittent failure
Browse files Browse the repository at this point in the history
Test TestShutdown fails intermittently on ppc64le
leveraging Eventually() and thus retry.

Change-Id: I4a4870105cba616663f4d25404e0f3ab253db214
Signed-off-by: Krishna Harsha Voora <[email protected]>
  • Loading branch information
krishvoor committed Sep 13, 2018
1 parent fdc4889 commit a828f47
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion orderer/common/cluster/comm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,13 @@ func TestShutdown(t *testing.T) {
node2.c.Configure(testChannel, []cluster.RemoteNode{node1.nodeInfo})
// Configuration of node doesn't take place
node1.c.Configure(testChannel, []cluster.RemoteNode{node2.nodeInfo})
gt := gomega.NewGomegaWithT(t)
gt.Eventually(func() (bool, error) {
_, err := node2.c.Remote(testChannel, node1.nodeInfo.ID)
return true, err
}).Should(gomega.BeTrue())

stub, err := node2.c.Remote(testChannel, node1.nodeInfo.ID)
assert.NoError(t, err)
// Therefore, sending a message doesn't succeed because node 1 rejected the configuration change
_, err = stub.Step(testStepReq)
assert.EqualError(t, err, "rpc error: code = Unknown desc = channel test doesn't exist")
Expand Down

0 comments on commit a828f47

Please sign in to comment.