Skip to content

Commit d956699

Browse files
committed
[FAB-14853] make raft IT to wait for OSN
While runing test case in integration tests which involve more than single Raft node, there is a need to wait until nodes will perform leader election. Otherwise ordering service might not become available on time, leading to integration test flakes in CI. This commit changes e2e integration test which spans 3 Raft node to wait for leader and ensure ordering service available to serve requests. Change-Id: Ic7b22c3b6efe192f4cdbd476e7e94c5b5f99ee9d Signed-off-by: Artem Barger <bartem@il.ibm.com>
1 parent 9ddb8af commit d956699

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

integration/e2e/e2e_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"syscall"
2121
"time"
2222

23-
docker "github.com/fsouza/go-dockerclient"
23+
"github.com/fsouza/go-dockerclient"
2424
"github.com/golang/protobuf/proto"
2525
"github.com/hyperledger/fabric-lib-go/healthz"
2626
"github.com/hyperledger/fabric/core/aclmgmt/resources"
@@ -212,6 +212,11 @@ var _ = Describe("EndToEnd", func() {
212212
blockFile2 := filepath.Join(testDir, "newest_orderer2_block.pb")
213213
blockFile3 := filepath.Join(testDir, "newest_orderer3_block.pb")
214214

215+
By("Ordering service system channel is ready")
216+
assertBlockReception(map[string]int{
217+
"systemchannel": 0,
218+
}, []*nwo.Orderer{orderer1, orderer2, orderer3}, peer, network)
219+
215220
fetchLatestBlock := func(targetOrderer *nwo.Orderer, blockFile string) {
216221
c := commands.ChannelFetch{
217222
ChannelID: "testchannel",

0 commit comments

Comments
 (0)