aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-06-15 11:47:54 +0200
committerSverker Eriksson <[email protected]>2015-06-15 11:47:54 +0200
commit71a78935f6c343cf07a623f1ea2b5457e37e9176 (patch)
treec0dd98b641c28a53b4858737c7626959be0a370e /lib/stdlib/test
parent2426e3deac1527c537cf1d36c5cd52ed6889e740 (diff)
downloadotp-71a78935f6c343cf07a623f1ea2b5457e37e9176.tar.gz
otp-71a78935f6c343cf07a623f1ea2b5457e37e9176.tar.bz2
otp-71a78935f6c343cf07a623f1ea2b5457e37e9176.zip
stdlib: Make ets:file2tab preserve read/write_concurrency
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/ets_SUITE.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index d5bf0e4c90..92c1c07e6d 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -4088,8 +4088,11 @@ tab2file(Config) when is_list(Config) ->
tab2file_do(FName, Opts) ->
%% Write an empty ets table to a file, read back and check properties.
- ?line Tab = ets_new(ets_SUITE_foo_tab, [named_table, set, private,
- {keypos, 2}]),
+ ?line Tab = ets_new(ets_SUITE_foo_tab, [named_table, set, public,
+ {keypos, 2},
+ compressed,
+ {write_concurrency,true},
+ {read_concurrency,true}]),
catch file:delete(FName),
Res = ets:tab2file(Tab, FName, Opts),
true = ets:delete(Tab),
@@ -4097,10 +4100,14 @@ tab2file_do(FName, Opts) ->
%
?line EtsMem = etsmem(),
?line {ok, Tab2} = ets:file2tab(FName),
- ?line private = ets:info(Tab2, protection),
+ public = ets:info(Tab2, protection),
?line true = ets:info(Tab2, named_table),
?line 2 = ets:info(Tab2, keypos),
?line set = ets:info(Tab2, type),
+ true = ets:info(Tab2, compressed),
+ Smp = erlang:system_info(smp_support),
+ Smp = ets:info(Tab2, read_concurrency),
+ Smp = ets:info(Tab2, write_concurrency),
?line true = ets:delete(Tab2),
?line verify_etsmem(EtsMem).