Skip to content

Commit a828f47

Browse files
author
Krishna Harsha Voora
committed
[FAB-11966] TestShutdown intermittent failure
Test TestShutdown fails intermittently on ppc64le leveraging Eventually() and thus retry. Change-Id: I4a4870105cba616663f4d25404e0f3ab253db214 Signed-off-by: Krishna Harsha Voora <krishvoor@in.ibm.com>
1 parent fdc4889 commit a828f47

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

orderer/common/cluster/comm_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,13 @@ func TestShutdown(t *testing.T) {
668668
node2.c.Configure(testChannel, []cluster.RemoteNode{node1.nodeInfo})
669669
// Configuration of node doesn't take place
670670
node1.c.Configure(testChannel, []cluster.RemoteNode{node2.nodeInfo})
671+
gt := gomega.NewGomegaWithT(t)
672+
gt.Eventually(func() (bool, error) {
673+
_, err := node2.c.Remote(testChannel, node1.nodeInfo.ID)
674+
return true, err
675+
}).Should(gomega.BeTrue())
676+
671677
stub, err := node2.c.Remote(testChannel, node1.nodeInfo.ID)
672-
assert.NoError(t, err)
673678
// Therefore, sending a message doesn't succeed because node 1 rejected the configuration change
674679
_, err = stub.Step(testStepReq)
675680
assert.EqualError(t, err, "rpc error: code = Unknown desc = channel test doesn't exist")

0 commit comments

Comments
 (0)