aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_telnet_SUITE_data
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2014-03-10 01:40:14 +0100
committerPeter Andersson <[email protected]>2014-03-12 16:00:14 +0100
commit609349f6acac4b03b8cac53eb9ad456a2b2d5536 (patch)
tree73d79e54d48a77b3b711cf19941b6d3c433cc5ff /lib/common_test/test/ct_telnet_SUITE_data
parentd6fb44e0575ecd022c30d5c6a7503c8849d98fa9 (diff)
downloadotp-609349f6acac4b03b8cac53eb9ad456a2b2d5536.tar.gz
otp-609349f6acac4b03b8cac53eb9ad456a2b2d5536.tar.bz2
otp-609349f6acac4b03b8cac53eb9ad456a2b2d5536.zip
Get ct_telnet_client to print all data from server to log
Diffstat (limited to 'lib/common_test/test/ct_telnet_SUITE_data')
-rw-r--r--lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl19
1 files changed, 18 insertions, 1 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 8d142e85a8..0277dc2a44 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
@@ -28,7 +28,8 @@ all() ->
ignore_prompt,
ignore_prompt_repeat,
ignore_prompt_sequence,
- ignore_prompt_timeout].
+ ignore_prompt_timeout,
+ server_speaks].
groups() ->
[].
@@ -188,3 +189,19 @@ no_prompt_check_timeout(_) ->
{timeout,1000}]),
ok = ct_telnet:close(Handle),
ok.
+
+%% Let the server say things, to make sure it gets printed correctly
+%% in the general IO log
+server_speaks(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "echo This is the first message"),
+ ok = ct_telnet:send(Handle, "echo This is the second message"),
+ %% let ct_telnet_client get an idle timeout
+ timer:sleep(15000),
+ ok = ct_telnet:send(Handle, "echo This is the third message"),
+ {ok,_} = ct_telnet:expect(Handle, ["the"], [no_prompt_check]),
+ {error,timeout} = ct_telnet:expect(Handle, ["the"], [no_prompt_check,
+ {timeout,1000}]),
+ ok = ct_telnet:send(Handle, "echo This is the fourth message"),
+ ok = ct_telnet:close(Handle),
+ ok.