Improve test coverage
Make compress on receipt/compaction configurable
This commit is contained in:
parent
61b7be5039
commit
1d475235d1
7 changed files with 56 additions and 35 deletions
|
@ -74,7 +74,8 @@ many_put_fetch_head(_Config) ->
|
|||
RootPath = testutil:reset_filestructure(),
|
||||
StartOpts1 = [{root_path, RootPath},
|
||||
{max_pencillercachesize, 16000},
|
||||
{sync_strategy, riak_sync}],
|
||||
{sync_strategy, riak_sync},
|
||||
{compression_point, on_compact}],
|
||||
{ok, Bookie1} = leveled_bookie:book_start(StartOpts1),
|
||||
{TestObject, TestSpec} = testutil:generate_testobject(),
|
||||
ok = testutil:book_riakput(Bookie1, TestObject, TestSpec),
|
||||
|
@ -83,7 +84,8 @@ many_put_fetch_head(_Config) ->
|
|||
StartOpts2 = [{root_path, RootPath},
|
||||
{max_journalsize, 500000000},
|
||||
{max_pencillercachesize, 32000},
|
||||
{sync_strategy, testutil:sync_strategy()}],
|
||||
{sync_strategy, testutil:sync_strategy()},
|
||||
{compression_point, on_receipt}],
|
||||
{ok, Bookie2} = leveled_bookie:book_start(StartOpts2),
|
||||
testutil:check_forobject(Bookie2, TestObject),
|
||||
GenList = [2, 20002, 40002, 60002, 80002,
|
||||
|
|
|
@ -307,17 +307,20 @@ aae_bustedjournal(_Config) ->
|
|||
|
||||
journal_compaction_bustedjournal(_Config) ->
|
||||
% Different circumstances will be created in different runs
|
||||
busted_journal_test(10000000),
|
||||
busted_journal_test(7777777).
|
||||
busted_journal_test(10000000, native, on_receipt),
|
||||
busted_journal_test(7777777, native, on_compact),
|
||||
busted_journal_test(8888888, lz4, on_receipt).
|
||||
|
||||
|
||||
busted_journal_test(MaxJournalSize) ->
|
||||
busted_journal_test(MaxJournalSize, PressMethod, PressPoint) ->
|
||||
% Simply confirms that none of this causes a crash
|
||||
RootPath = testutil:reset_filestructure(),
|
||||
StartOpts1 = [{root_path, RootPath},
|
||||
{max_journalsize, MaxJournalSize},
|
||||
{max_run_length, 10},
|
||||
{sync_strategy, testutil:sync_strategy()}],
|
||||
{sync_strategy, testutil:sync_strategy()},
|
||||
{compression_method, PressMethod},
|
||||
{compression_point, PressPoint}],
|
||||
{ok, Bookie1} = leveled_bookie:book_start(StartOpts1),
|
||||
{TestObject, TestSpec} = testutil:generate_testobject(),
|
||||
ok = testutil:book_riakput(Bookie1, TestObject, TestSpec),
|
||||
|
@ -360,6 +363,7 @@ busted_journal_test(MaxJournalSize) ->
|
|||
testutil:reset_filestructure(10000).
|
||||
|
||||
|
||||
|
||||
rotating_object_check(BookOpts, B, NumberOfObjects) ->
|
||||
{ok, Book1} = leveled_bookie:book_start(BookOpts),
|
||||
{KSpcL1, V1} = testutil:put_indexed_objects(Book1, B, NumberOfObjects),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue