Improve inker unit test

Change in filename labelling had stopped a unit test from covering
stratup correctly.  Now offering better coverage
This commit is contained in:
martinsumner 2016-10-16 16:58:55 +01:00
parent e3ce372f31
commit 8653e9d90d

View file

@ -299,10 +299,7 @@ handle_call({close, Force}, _From, State) ->
{reply, pause, State}; {reply, pause, State};
_ -> _ ->
{stop, normal, ok, State} {stop, normal, ok, State}
end; end.
handle_call(Msg, _From, State) ->
io:format("Unexpected message ~w~n", [Msg]),
{reply, error, State}.
handle_cast(_Msg, State) -> handle_cast(_Msg, State) ->
{noreply, State}. {noreply, State}.
@ -814,10 +811,10 @@ simple_inker_completeactivejournal_test() ->
RootPath = "../test/journal", RootPath = "../test/journal",
build_dummy_journal(), build_dummy_journal(),
CDBopts = #cdb_options{max_size=300000}, CDBopts = #cdb_options{max_size=300000},
{ok, PidW} = leveled_cdb:cdb_open_writer(filepath(RootPath, JournalFP = filepath(RootPath, journal_dir),
3, F2 = filename:join(JournalFP, "nursery_3.pnd"),
new_journal)), {ok, PidW} = leveled_cdb:cdb_open_writer(F2),
{ok, _FN} = leveled_cdb:cdb_complete(PidW), {ok, _F2} = leveled_cdb:cdb_complete(PidW),
{ok, Ink1} = ink_start(#inker_options{root_path=RootPath, {ok, Ink1} = ink_start(#inker_options{root_path=RootPath,
cdb_options=CDBopts}), cdb_options=CDBopts}),
Obj1 = ink_get(Ink1, "Key1", 1), Obj1 = ink_get(Ink1, "Key1", 1),