aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-12-13 17:42:31 +0100
committerIngela Anderton Andin <[email protected]>2018-12-14 09:31:38 +0100
commit28dcf6d400cea06e4bc8ca1d4224aae009ef232e (patch)
tree8e72c27c820a907649ac57784de3c08077fa4200 /lib/ssl
parentb60dbb1ce35144fda0dacd96e5271e3ed812be9b (diff)
downloadotp-28dcf6d400cea06e4bc8ca1d4224aae009ef232e.tar.gz
otp-28dcf6d400cea06e4bc8ca1d4224aae009ef232e.tar.bz2
otp-28dcf6d400cea06e4bc8ca1d4224aae009ef232e.zip
ssl: Fix test case
packet raw is a stream, test code manged it packet oriented in the function active_raw.
Diffstat (limited to 'lib/ssl')
-rw-r--r--lib/ssl/test/ssl_packet_SUITE.erl23
1 files changed, 5 insertions, 18 deletions
diff --git a/lib/ssl/test/ssl_packet_SUITE.erl b/lib/ssl/test/ssl_packet_SUITE.erl
index 9af1ae0e3f..6d26b2df33 100644
--- a/lib/ssl/test/ssl_packet_SUITE.erl
+++ b/lib/ssl/test/ssl_packet_SUITE.erl
@@ -2122,26 +2122,13 @@ active_once_packet(Socket, Data, N) ->
active_once_packet(Socket, Data, N-1).
active_raw(Socket, Data, N) ->
- active_raw(Socket, Data, N, []).
-
-active_raw(_Socket, _, 0, _) ->
+ active_raw(Socket, (length(Data) * N)).
+active_raw(_Socket, 0) ->
ok;
-active_raw(Socket, Data, N, Acc) ->
+active_raw(Socket, N) ->
receive
- {ssl, Socket, Byte} when length(Byte) == 1 ->
- receive
- {ssl, Socket, _} ->
- active_raw(Socket, Data, N -1)
- end;
- {ssl, Socket, Data} ->
- active_raw(Socket, Data, N-1, []);
- {ssl, Socket, Other} ->
- case Acc ++ Other of
- Data ->
- active_raw(Socket, Data, N-1, []);
- NewAcc ->
- active_raw(Socket, Data, NewAcc)
- end
+ {ssl, Socket, Bytes} ->
+ active_raw(Socket, N-length(Bytes))
end.
active_packet(Socket, _, 0) ->