aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jinterface/test/nc_SUITE.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2012-10-18 12:29:24 +0200
committerHenrik Nord <[email protected]>2012-10-18 12:29:28 +0200
commit9a993c9479b94309861b7620d56fd12cfcab5740 (patch)
tree1821803793ddc87c2076b60c6c971a94096abc3e /lib/jinterface/test/nc_SUITE.erl
parentf0332a299d3c6eea7089483f05a7e6f580e40f3c (diff)
parent54b85a7cb1eafcbc1c0116eaf21e05f1810db388 (diff)
downloadotp-9a993c9479b94309861b7620d56fd12cfcab5740.tar.gz
otp-9a993c9479b94309861b7620d56fd12cfcab5740.tar.bz2
otp-9a993c9479b94309861b7620d56fd12cfcab5740.zip
Merge branch 'nk/jinterface-fix_compressed_binary'
* nk/jinterface-fix_compressed_binary: add (de)compress roundtrip tests with larger values fix reading compressed binary terms from Java OTP-10505
Diffstat (limited to 'lib/jinterface/test/nc_SUITE.erl')
-rw-r--r--lib/jinterface/test/nc_SUITE.erl18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/jinterface/test/nc_SUITE.erl b/lib/jinterface/test/nc_SUITE.erl
index 9c88400c2a..d5388e54f4 100644
--- a/lib/jinterface/test/nc_SUITE.erl
+++ b/lib/jinterface/test/nc_SUITE.erl
@@ -89,7 +89,7 @@ end_per_suite(Config) ->
init_per_testcase(Case, Config) ->
T = case atom_to_list(Case) of
"unicode"++_ -> 240;
- _ -> 20
+ _ -> 30
end,
WatchDog = test_server:timetrap(test_server:seconds(T)),
[{watchdog, WatchDog}| Config].
@@ -187,10 +187,18 @@ binary_roundtrip(Config) when is_list(Config) ->
decompress_roundtrip(doc) -> [];
decompress_roundtrip(suite) -> [];
decompress_roundtrip(Config) when is_list(Config) ->
+ RandomBin = erlang:term_to_binary(lists:seq(1, 5 * 1024 * 1024)), % roughly 26MB
+ <<RandomBin1k:1024/binary,_/binary>> = RandomBin,
+ <<RandomBin1M:1048576/binary,_/binary>> = RandomBin,
+ <<RandomBin10M:10485760/binary,_/binary>> = RandomBin,
Terms =
[0.0,
math:sqrt(2),
<<1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,31:5>>,
+ RandomBin1k,
+ RandomBin1M,
+ RandomBin10M,
+ RandomBin,
make_ref()],
OutTrans =
fun (D) ->
@@ -205,10 +213,18 @@ decompress_roundtrip(Config) when is_list(Config) ->
compress_roundtrip(doc) -> [];
compress_roundtrip(suite) -> [];
compress_roundtrip(Config) when is_list(Config) ->
+ RandomBin = erlang:term_to_binary(lists:seq(1, 5 * 1024 * 1024)), % roughly 26MB
+ <<RandomBin1k:1024/binary,_/binary>> = RandomBin,
+ <<RandomBin1M:1048576/binary,_/binary>> = RandomBin,
+ <<RandomBin10M:10485760/binary,_/binary>> = RandomBin,
Terms =
[0.0,
math:sqrt(2),
<<1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,31:5>>,
+ RandomBin1k,
+ RandomBin1M,
+ RandomBin10M,
+ RandomBin,
make_ref()],
OutTrans =
fun (D) ->