aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2014-11-03 12:07:15 +0100
committerSiri Hansen <[email protected]>2014-11-27 12:13:24 +0100
commitcc3200e4010e994529af659d41057e6587f36079 (patch)
treeff7bd9d372c695defe1d9821943a7f78f9f86277 /lib
parent59e87972927c947353231d018217da696d03478c (diff)
downloadotp-cc3200e4010e994529af659d41057e6587f36079.tar.gz
otp-cc3200e4010e994529af659d41057e6587f36079.tar.bz2
otp-cc3200e4010e994529af659d41057e6587f36079.zip
[ct_telnet] Extend timeout in test from 1 to 2 sek
This is for stabilizing test cases.
Diffstat (limited to 'lib')
-rw-r--r--lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl
index 9afe545b26..6ec7947b3e 100644
--- a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl
+++ b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl
@@ -22,6 +22,8 @@
-define(DONT, 254).
-define(IAC, 255).
+-define(SHORT_TIME,2000).
+
%%--------------------------------------------------------------------
%% TEST SERVER CALLBACK FUNCTIONS
%%--------------------------------------------------------------------
@@ -115,7 +117,7 @@ expect_error_prompt(_) ->
expect_error_timeout1(_) ->
{ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_no_prompt xxx"),
- {error,timeout} = ct_telnet:expect(Handle, ["xxx"], [{timeout,1000}]),
+ {error,timeout} = ct_telnet:expect(Handle, ["xxx"], [{timeout,?SHORT_TIME}]),
ok = ct_telnet:close(Handle),
ok.
@@ -178,16 +180,16 @@ ignore_prompt_timeout(_) ->
{ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx"),
{error,timeout} = ct_telnet:expect(Handle, ["yyy"], [ignore_prompt,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:send(Handle, "echo xxx"), % sends prompt and newline
{ok,["xxx"]} = ct_telnet:expect(Handle, ["xxx"], [ignore_prompt,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:send(Handle, "echo_no_prompt xxx\n"), % no prompt, but newline
{ok,["xxx"]} = ct_telnet:expect(Handle, ["xxx"], [ignore_prompt,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:send(Handle, "echo_no_prompt xxx"), % no prompt, no newline
{error,timeout} = ct_telnet:expect(Handle, ["xxx"], [ignore_prompt,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:close(Handle),
ok.
@@ -233,7 +235,7 @@ no_prompt_check_timeout(_) ->
{ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx"),
{error,timeout} = ct_telnet:expect(Handle, ["yyy"], [no_prompt_check,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:close(Handle),
ok.
@@ -283,7 +285,7 @@ server_speaks(_) ->
ok = ct_telnet:send(Handle, "echo_no_prompt This is the third message\r\n"),
{ok,_} = ct_telnet:expect(Handle, ["the"], [no_prompt_check]),
{error,timeout} = ct_telnet:expect(Handle, ["the"], [no_prompt_check,
- {timeout,1000}]),
+ {timeout,?SHORT_TIME}]),
ok = ct_telnet:send(Handle, "echo_no_prompt This is the fourth message\r\n"),
%% give the server time to respond
timer:sleep(2000),