Skip to content

Commit

Permalink
Fix flake in TestCreateChainWithTimeoutErr
Browse files Browse the repository at this point in the history
This CR (hopefully) fixes the intermittent failure
in TestCreateChainWithTimeoutErr by explicitly setting
the channel creation and client connection timeouts.

FAB-10957 #done

Change-Id: I81a7a9980d8b2df03bf3df5df26d77358b881d05
Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
  • Loading branch information
wlahti committed Jan 10, 2019
1 parent de0f591 commit a15a2e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions peer/channel/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func TestCreateChainWithTimeoutErr(t *testing.T) {
cmd := createCmd(mockCF)
AddFlags(cmd)
channelCmd.AddCommand(cmd)
args := []string{"create", "-c", mockchain, "-o", "localhost:8102", "-t", "10ms"}
args := []string{"create", "-c", mockchain, "-o", "localhost:8102", "-t", "10ms", "--connTimeout", "1s"}
channelCmd.SetArgs(args)

if err := channelCmd.Execute(); err == nil {
Expand All @@ -325,7 +325,7 @@ func TestCreateChainWithTimeoutErr(t *testing.T) {
}

// failure - point to bad port and time out connecting to orderer
args = []string{"create", "-c", mockchain, "-o", "localhost:0", "--connTimeout", "10ms"}
args = []string{"create", "-c", mockchain, "-o", "localhost:0", "-t", "1s", "--connTimeout", "10ms"}
channelCmd.SetArgs(args)

if err := channelCmd.Execute(); err == nil {
Expand Down

0 comments on commit a15a2e9

Please sign in to comment.