Skip to content

Commit a45c3bf

Browse files
sykesmmastersingh24
authored andcommitted
[FAB-10957] use 0 as bad port for connect fail
The test tries to point to a port that has no local listeners to test behavior when connecting to the orderer fails. Instead of using 9999, use the invalid port of 0 as no process can listen on that port. Change-Id: I6f63b80e7798336a5ddf2c58b55c44fc8b180906 Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
1 parent 592ca7b commit a45c3bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

peer/channel/create_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,8 @@ func TestCreateChainWithTimeoutErr(t *testing.T) {
324324
assert.Contains(t, err.Error(), "timeout waiting for channel creation")
325325
}
326326

327-
// failure - times out connecting to orderer
328-
args = []string{"create", "-c", mockchain, "-o", "localhost:9999", "--connTimeout", "10ms"}
327+
// failure - point to bad port and time out connecting to orderer
328+
args = []string{"create", "-c", mockchain, "-o", "localhost:0", "--connTimeout", "10ms"}
329329
channelCmd.SetArgs(args)
330330

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

0 commit comments

Comments
 (0)