Test coverage
Code no longer requires LongRunning to be undefined so that it can be decided through bext guess. Also cover branches of tictac tree code.
This commit is contained in:
parent
53c3bf6c37
commit
5b5b4a3a29
2 changed files with 7 additions and 17 deletions
|
@ -591,26 +591,10 @@ snapshot_store(LedgerCache, Penciller, Inker, SnapType, Query, LongRunning) ->
|
|||
LedgerCacheReady#ledger_cache.index,
|
||||
LedgerCacheReady#ledger_cache.min_sqn,
|
||||
LedgerCacheReady#ledger_cache.max_sqn},
|
||||
LongRunning0 =
|
||||
case LongRunning of
|
||||
undefined ->
|
||||
case Query of
|
||||
undefined ->
|
||||
true;
|
||||
no_lookup ->
|
||||
true;
|
||||
_ ->
|
||||
% If a specific query has been defined, then not expected
|
||||
% to be long running
|
||||
false
|
||||
end;
|
||||
TrueOrFalse ->
|
||||
TrueOrFalse
|
||||
end,
|
||||
PCLopts = #penciller_options{start_snapshot = true,
|
||||
source_penciller = Penciller,
|
||||
snapshot_query = Query,
|
||||
snapshot_longrunning = LongRunning0,
|
||||
snapshot_longrunning = LongRunning,
|
||||
bookies_mem = BookiesMem},
|
||||
{ok, LedgerSnapshot} = leveled_penciller:pcl_start(PCLopts),
|
||||
case SnapType of
|
||||
|
|
|
@ -553,6 +553,12 @@ exportable_test() ->
|
|||
{Int1, Int2} = tictac_hash(<<"key">>, <<"value">>),
|
||||
?assertMatch({true, true}, {Int1 >= 0, Int2 >=0}).
|
||||
|
||||
merge_emptytree_test() ->
|
||||
TreeA = new_tree("A"),
|
||||
TreeB = new_tree("B"),
|
||||
TreeC = merge_trees(TreeA, TreeB),
|
||||
?assertMatch([], find_dirtyleaves(TreeA, TreeC)).
|
||||
|
||||
-endif.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue