diff options
author | Anders Svensson <[email protected]> | 2017-04-12 18:40:13 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2017-06-11 16:30:37 +0200 |
commit | d7f83ba37b7fb9a9af635213e7ca8877a4438c05 (patch) | |
tree | b385185750dcbba71586cc0743f56ecc38a65b78 /lib/diameter/test/diameter_traffic_SUITE.erl | |
parent | 618acfe5dcb0aa3d8ec0101704cd8fc774ac6c90 (diff) | |
download | otp-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_traffic_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_traffic_SUITE.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index 5ae05a8bb6..7fd13b0536 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -717,14 +717,14 @@ send_unexpected_mandatory(Config) -> %% Send something long that will be fragmented by TCP. send_long(Config) -> Req = ['STR', {'Termination-Cause', ?LOGOUT}, - {'User-Name', [lists:duplicate(1 bsl 20, $X)]}], + {'User-Name', [binary:copy(<<$X>>, 1 bsl 20)]}], ['STA', {'Session-Id', _}, {'Result-Code', ?SUCCESS} | _] = call(Config, Req). %% Send something longer than the configure incoming_maxlen. send_maxlen(Config) -> Req = ['STR', {'Termination-Cause', ?LOGOUT}, - {'User-Name', [lists:duplicate(1 bsl 21, $X)]}], + {'User-Name', [binary:copy(<<$X>>, 1 bsl 21)]}], {timeout, _} = call(Config, Req). %% Send something for which pick_peer finds no suitable peer. |