parent
cc676190c4
commit
9a0082db4e
1 changed files with 50 additions and 12 deletions
|
@ -12,21 +12,23 @@
|
|||
is_empty_test/1,
|
||||
many_put_fetch_switchcompression/1,
|
||||
bigjournal_littlejournal/1,
|
||||
safereaderror_startup/1
|
||||
safereaderror_startup/1,
|
||||
remove_journal_test/1
|
||||
]).
|
||||
|
||||
all() -> [
|
||||
simple_put_fetch_head_delete,
|
||||
many_put_fetch_head,
|
||||
journal_compaction,
|
||||
fetchput_snapshot,
|
||||
load_and_count,
|
||||
load_and_count_withdelete,
|
||||
space_clear_ondelete,
|
||||
is_empty_test,
|
||||
many_put_fetch_switchcompression,
|
||||
bigjournal_littlejournal,
|
||||
safereaderror_startup
|
||||
% simple_put_fetch_head_delete,
|
||||
% many_put_fetch_head,
|
||||
% journal_compaction,
|
||||
% fetchput_snapshot,
|
||||
% load_and_count,
|
||||
% load_and_count_withdelete,
|
||||
% space_clear_ondelete,
|
||||
% is_empty_test,
|
||||
% many_put_fetch_switchcompression,
|
||||
% bigjournal_littlejournal,
|
||||
% safereaderror_startup,
|
||||
remove_journal_test
|
||||
].
|
||||
|
||||
|
||||
|
@ -831,6 +833,42 @@ is_empty_test(_Config) ->
|
|||
ok = leveled_bookie:book_close(Bookie1).
|
||||
|
||||
|
||||
remove_journal_test(_Config) ->
|
||||
RootPath = testutil:reset_filestructure(),
|
||||
StartOpts1 = [{root_path, RootPath},
|
||||
{max_pencillercachesize, 16000},
|
||||
{sync_strategy, testutil:sync_strategy()},
|
||||
{compression_point, on_compact}],
|
||||
{ok, Bookie1} = leveled_bookie:book_start(StartOpts1),
|
||||
GenList = [1, 20001, 40001, 60001],
|
||||
CLs = testutil:load_objects(20000, GenList, Bookie1, no_check,
|
||||
fun testutil:generate_smallobjects/2),
|
||||
CheckList1 = lists:sublist(lists:nth(1, CLs), 100, 1000),
|
||||
CheckList2 = lists:sublist(lists:nth(2, CLs), 100, 1000),
|
||||
CheckList3 = lists:sublist(lists:nth(3, CLs), 100, 1000),
|
||||
CheckList4 = lists:sublist(lists:nth(4, CLs), 100, 1000),
|
||||
testutil:check_forlist(Bookie1, CheckList1),
|
||||
testutil:check_forlist(Bookie1, CheckList2),
|
||||
testutil:check_forlist(Bookie1, CheckList3),
|
||||
testutil:check_forlist(Bookie1, CheckList4),
|
||||
|
||||
ok = leveled_bookie:book_close(Bookie1),
|
||||
leveled_inker:clean_testdir(RootPath ++ "/journal"),
|
||||
{ok, Bookie2} = leveled_bookie:book_start(StartOpts1),
|
||||
|
||||
% If we're not careful here new data will be added, and we
|
||||
% won't be able to read it
|
||||
[NewCheckList] =
|
||||
testutil:load_objects(1000, [80001], Bookie2, no_check,
|
||||
fun testutil:generate_smallobjects/2),
|
||||
|
||||
ok = leveled_bookie:book_close(Bookie2),
|
||||
{ok, Bookie3} = leveled_bookie:book_start(StartOpts1),
|
||||
testutil:check_forlist(Bookie3, NewCheckList),
|
||||
ok = leveled_bookie:book_destroy(Bookie3).
|
||||
|
||||
|
||||
|
||||
many_put_fetch_switchcompression(_Config) ->
|
||||
RootPath = testutil:reset_filestructure(),
|
||||
StartOpts1 = [{root_path, RootPath},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue