aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/disk_log_SUITE.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2011-10-10 15:53:37 +0200
committerHans Bolinder <[email protected]>2011-10-10 15:53:37 +0200
commit6ca6dd3c670fb8185ebb9a20c2a731a7375c1cac (patch)
treeb3b422d7fb2079b04b48ddb378d1ff21b754c142 /lib/kernel/test/disk_log_SUITE.erl
parenteb9656c94f4e92c2a4875dc628cb41d283dd4d2b (diff)
parent12c84d2ec315c8d26afc2adb8aa50cfe6183fc8a (diff)
downloadotp-6ca6dd3c670fb8185ebb9a20c2a731a7375c1cac.tar.gz
otp-6ca6dd3c670fb8185ebb9a20c2a731a7375c1cac.tar.bz2
otp-6ca6dd3c670fb8185ebb9a20c2a731a7375c1cac.zip
Merge branch 'hb/kernel/fix_disk_log/OTP-9508'
* hb/kernel/fix_disk_log/OTP-9508: Fix two minor disk_log bugs
Diffstat (limited to 'lib/kernel/test/disk_log_SUITE.erl')
-rw-r--r--lib/kernel/test/disk_log_SUITE.erl11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/kernel/test/disk_log_SUITE.erl b/lib/kernel/test/disk_log_SUITE.erl
index ee1e2319b5..ad987fe7a7 100644
--- a/lib/kernel/test/disk_log_SUITE.erl
+++ b/lib/kernel/test/disk_log_SUITE.erl
@@ -1831,11 +1831,16 @@ block_queue2(Conf) when is_list(Conf) ->
%% Asynchronous stuff is ignored.
?line ok = disk_log:balog_terms(n, [<<"foo">>,<<"bar">>]),
?line ok = disk_log:balog_terms(n, [<<"more">>,<<"terms">>]),
+ Parent = self(),
?line Fun =
- fun() -> {error,disk_log_stopped} = disk_log:sync(n)
+ fun() ->
+ {error,no_such_log} = disk_log:sync(n),
+ receive {disk_log, _, {error, disk_log_stopped}} -> ok end,
+ Parent ! disk_log_stopped_ok
end,
?line spawn(Fun),
?line ok = sync_do(Pid, close),
+ ?line receive disk_log_stopped_ok -> ok end,
?line sync_do(Pid, terminate),
?line {ok,<<>>} = file:read_file(File ++ ".1"),
?line del(File, No),
@@ -2708,7 +2713,7 @@ error_log(Conf) when is_list(Conf) ->
% reopen (rename) fails, the log is terminated, ./File.2/ exists
?line {ok, n} = disk_log:open([{name, n}, {file, File}, {type, halt},
{format, external},{size, 100000}]),
- ?line {error, eisdir} = disk_log:reopen(n, LDir),
+ ?line {error, {file_error, _, eisdir}} = disk_log:reopen(n, LDir),
?line true = (P0 == pps()),
?line file:delete(File),
@@ -2719,7 +2724,7 @@ error_log(Conf) when is_list(Conf) ->
?line {ok, n} = disk_log:open([{name, n}, {file, File2}, {type, wrap},
{format, external},{size, {100, No}}]),
?line ok = disk_log:blog_terms(n, [B,B,B]),
- ?line {error, eisdir} = disk_log:reopen(n, File),
+ ?line {error, {file_error, _, eisdir}} = disk_log:reopen(n, File),
?line {error, no_such_log} = disk_log:close(n),
?line del(File2, No),
?line del(File, No),