Tidy up test shutdown
This commit is contained in:
parent
5cee3a8e4e
commit
e8bd712fb8
3 changed files with 10 additions and 3 deletions
|
@ -923,7 +923,9 @@ compact_empty_file_test() ->
|
||||||
{3, {o, "Bucket", "Key3", null}}],
|
{3, {o, "Bucket", "Key3", null}}],
|
||||||
LedgerFun1 = fun(_Srv, _Key, _ObjSQN) -> false end,
|
LedgerFun1 = fun(_Srv, _Key, _ObjSQN) -> false end,
|
||||||
Score1 = check_single_file(CDB2, LedgerFun1, LedgerSrv1, 9, 8, 4),
|
Score1 = check_single_file(CDB2, LedgerFun1, LedgerSrv1, 9, 8, 4),
|
||||||
?assertMatch(100.0, Score1).
|
?assertMatch(100.0, Score1),
|
||||||
|
ok = leveled_cdb:cdb_deletepending(CDB2),
|
||||||
|
ok = leveled_cdb:cdb_destroy(CDB2).
|
||||||
|
|
||||||
compare_candidate_test() ->
|
compare_candidate_test() ->
|
||||||
Candidate1 = #candidate{low_sqn=1},
|
Candidate1 = #candidate{low_sqn=1},
|
||||||
|
|
|
@ -299,6 +299,7 @@ ink_compactjournal(Pid, Checker, InitiateFun, CloseFun, FilterFun, Timeout) ->
|
||||||
FilterFun,
|
FilterFun,
|
||||||
Timeout},
|
Timeout},
|
||||||
infinity).
|
infinity).
|
||||||
|
|
||||||
-spec ink_compactioncomplete(pid()) -> ok.
|
-spec ink_compactioncomplete(pid()) -> ok.
|
||||||
%% @doc
|
%% @doc
|
||||||
%% Used by a clerk to state that a compaction process is over, only change
|
%% Used by a clerk to state that a compaction process is over, only change
|
||||||
|
@ -933,7 +934,6 @@ clean_subdir(DirPath) ->
|
||||||
end,
|
end,
|
||||||
Files).
|
Files).
|
||||||
|
|
||||||
|
|
||||||
simple_inker_test() ->
|
simple_inker_test() ->
|
||||||
RootPath = "../test/journal",
|
RootPath = "../test/journal",
|
||||||
build_dummy_journal(),
|
build_dummy_journal(),
|
||||||
|
@ -977,6 +977,9 @@ test_ledgerkey(Key) ->
|
||||||
{o, "Bucket", Key, null}.
|
{o, "Bucket", Key, null}.
|
||||||
|
|
||||||
compact_journal_test() ->
|
compact_journal_test() ->
|
||||||
|
{timeout, 60, fun compact_journal_testto/0}.
|
||||||
|
|
||||||
|
compact_journal_testto() ->
|
||||||
RootPath = "../test/journal",
|
RootPath = "../test/journal",
|
||||||
build_dummy_journal(fun test_ledgerkey/1),
|
build_dummy_journal(fun test_ledgerkey/1),
|
||||||
CDBopts = #cdb_options{max_size=300000},
|
CDBopts = #cdb_options{max_size=300000},
|
||||||
|
@ -1044,6 +1047,8 @@ compact_journal_test() ->
|
||||||
?assertMatch(false, R),
|
?assertMatch(false, R),
|
||||||
?assertMatch(2, length(CompactedManifest2)),
|
?assertMatch(2, length(CompactedManifest2)),
|
||||||
ink_close(Ink1),
|
ink_close(Ink1),
|
||||||
|
% Need to wait for delete_pending files to timeout
|
||||||
|
timer:sleep(10000),
|
||||||
clean_testdir(RootPath).
|
clean_testdir(RootPath).
|
||||||
|
|
||||||
empty_manifest_test() ->
|
empty_manifest_test() ->
|
||||||
|
|
|
@ -297,7 +297,7 @@
|
||||||
{"CDB04",
|
{"CDB04",
|
||||||
{info, "Deletion confirmed for file ~s at ManifestSQN ~w"}},
|
{info, "Deletion confirmed for file ~s at ManifestSQN ~w"}},
|
||||||
{"CDB05",
|
{"CDB05",
|
||||||
{info, "Closing of filename ~s for Reason ~w"}},
|
{info, "Closing of filename ~s for reason ~w"}},
|
||||||
{"CDB06",
|
{"CDB06",
|
||||||
{info, "File to be truncated at last position of ~w with end of "
|
{info, "File to be truncated at last position of ~w with end of "
|
||||||
++ "file at ~w"}},
|
++ "file at ~w"}},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue