diff options
author | Hans Nilsson <[email protected]> | 2018-10-23 16:06:19 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-10-29 10:41:33 +0100 |
commit | cc462bb16fa2c004d4ffcaa5e7a2b9238f73b56d (patch) | |
tree | 6e09ad803a230471372a86ec79d6f62a5dcf6cca /lib/ssh | |
parent | 4a221f5401250d92f6d0a4047e2131979b59d47f (diff) | |
download | otp-cc462bb16fa2c004d4ffcaa5e7a2b9238f73b56d.tar.gz otp-cc462bb16fa2c004d4ffcaa5e7a2b9238f73b56d.tar.bz2 otp-cc462bb16fa2c004d4ffcaa5e7a2b9238f73b56d.zip |
ssh: Fix property_test/ssh_eqc_client_info_timing.erl
Had problems on Darwin, Solaris and FreeBSD.
Diffstat (limited to 'lib/ssh')
-rw-r--r-- | lib/ssh/test/property_test/ssh_eqc_client_info_timing.erl | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/ssh/test/property_test/ssh_eqc_client_info_timing.erl b/lib/ssh/test/property_test/ssh_eqc_client_info_timing.erl index 6d0d8f5d99..f4b521356f 100644 --- a/lib/ssh/test/property_test/ssh_eqc_client_info_timing.erl +++ b/lib/ssh/test/property_test/ssh_eqc_client_info_timing.erl @@ -58,6 +58,7 @@ %%% Properties: prop_seq(Config) -> + error_logger:tty(false), {ok,Pid} = ssh_eqc_event_handler:add_report_handler(), {_, _, Port} = init_daemon(Config), numtests(1000, @@ -66,16 +67,25 @@ prop_seq(Config) -> send_bad_sequence(Port, Delay, Pid), not any_relevant_error_report(Pid) catch - C:E -> io:format('~p:~p~n',[C,E]), + C:E:S -> ct:log("~p:~p~n~p",[C,E,S]), false end )). send_bad_sequence(Port, Delay, Pid) -> - {ok,S} = gen_tcp:connect("localhost",Port,[]), - gen_tcp:send(S,"Illegal info-string\r\n"), - ssh_test_lib:sleep_microsec(Delay), - gen_tcp:close(S). + send_bad_sequence(Port, Delay, Pid, 10). + +send_bad_sequence(Port, Delay, Pid, N) -> + case gen_tcp:connect("localhost",Port,[]) of + {ok,S} -> + gen_tcp:send(S,"Illegal info-string\r\n"), + ssh_test_lib:sleep_microsec(Delay), + gen_tcp:close(S); + + {error,econnreset} when N>0 -> + timer:sleep(1), + send_bad_sequence(Port, Delay, Pid, N-1) + end. any_relevant_error_report(Pid) -> {ok, Reports} = ssh_eqc_event_handler:get_reports(Pid), |