aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_gen_tcp_SUITE.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2017-04-12 18:40:13 +0200
committerAnders Svensson <[email protected]>2017-06-11 16:30:37 +0200
commitd7f83ba37b7fb9a9af635213e7ca8877a4438c05 (patch)
treeb385185750dcbba71586cc0743f56ecc38a65b78 /lib/diameter/test/diameter_gen_tcp_SUITE.erl
parent618acfe5dcb0aa3d8ec0101704cd8fc774ac6c90 (diff)
downloadotp-d7f83ba37b7fb9a9af635213e7ca8877a4438c05.tar.gz
otp-d7f83ba37b7fb9a9af635213e7ca8877a4438c05.tar.bz2
otp-d7f83ba37b7fb9a9af635213e7ca8877a4438c05.zip
Use binary:copy/2 when generating largish data in test suites
Faster than lists:duplicate/2.
Diffstat (limited to 'lib/diameter/test/diameter_gen_tcp_SUITE.erl')
-rw-r--r--lib/diameter/test/diameter_gen_tcp_SUITE.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_gen_tcp_SUITE.erl b/lib/diameter/test/diameter_gen_tcp_SUITE.erl
index 2be2cf4b35..db42ea813e 100644
--- a/lib/diameter/test/diameter_gen_tcp_SUITE.erl
+++ b/lib/diameter/test/diameter_gen_tcp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2014-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2014-2017. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -54,7 +54,7 @@ all() ->
send_long(_) ->
{Sock, SendF} = connection(),
- B = list_to_binary(lists:duplicate(1 bsl 20, $X)),
+ B = binary:copy(<<$X>>, 1 bsl 20),
ok = SendF(B),
B = recv(Sock, size(B), []).