Dialyzer and eunit fix
This commit is contained in:
parent
3a0086afb2
commit
dffb73330d
4 changed files with 9 additions and 8 deletions
|
@ -85,8 +85,8 @@ fitness(FluName) ->
|
|||
|
||||
-spec flu1(atom()) -> [{atom(), term()}].
|
||||
flu1(FluName) ->
|
||||
State = machi_flu1:current_state(FluName),
|
||||
machi_flu1:format_state(State).
|
||||
State = machi_flu1_append_server:current_state(FluName),
|
||||
machi_flu1_append_server:format_state(State).
|
||||
|
||||
%% Internal functions
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ append_server_dispatch(From, CoC_Namespace, CoC_Locator,
|
|||
Other
|
||||
end,
|
||||
_ = gen_server:reply(From, Result),
|
||||
exit(normal).
|
||||
ok.
|
||||
|
||||
handle_append(_N, _L, _Prefix, <<>>, _Csum, _Extra, _FluName, _EpochId) ->
|
||||
{error, bad_arg};
|
||||
|
|
|
@ -67,12 +67,12 @@
|
|||
]).
|
||||
|
||||
-define(TIMEOUT, 10 * 1000).
|
||||
-include("machi_projection.hrl"). %% included for pv1_epoch_n type
|
||||
-include("machi_projection.hrl"). %% included for pv1_epoch type
|
||||
|
||||
-record(state, {fluname :: atom(),
|
||||
tid :: ets:tid(),
|
||||
datadir :: string(),
|
||||
epoch :: pv1_epoch_n()
|
||||
epoch :: pv1_epoch()
|
||||
}).
|
||||
|
||||
%% public API
|
||||
|
@ -88,7 +88,7 @@ start_link(FluName, DataDir) when is_atom(FluName) andalso is_list(DataDir) ->
|
|||
gen_server:start_link({local, N}, ?MODULE, [FluName, DataDir], []).
|
||||
|
||||
-spec find_or_make_filename_from_prefix( FluName :: atom(),
|
||||
EpochId :: pv1_epoch_n(),
|
||||
EpochId :: pv1_epoch(),
|
||||
Prefix :: {prefix, string()},
|
||||
machi_dt:coc_nl()) ->
|
||||
{file, Filename :: string()} | {error, Reason :: term() } | timeout.
|
||||
|
@ -130,7 +130,7 @@ list_files_by_prefix(_FluName, Other) ->
|
|||
init([FluName, DataDir]) ->
|
||||
Tid = ets:new(make_filename_mgr_name(FluName), [named_table, {read_concurrency, true}]),
|
||||
{ok, #state{fluname = FluName,
|
||||
epoch = 0,
|
||||
epoch = ?DUMMY_PV1_EPOCH,
|
||||
datadir = DataDir,
|
||||
tid = Tid}}.
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ smoke_test_() ->
|
|||
fun() -> machi_cinfo:private_projection(a) end,
|
||||
fun() -> machi_cinfo:fitness(a) end,
|
||||
fun() -> machi_cinfo:chain_manager(a) end,
|
||||
fun() -> machi_cinfo:flu1(a) end,
|
||||
fun() -> machi_cinfo:dump() end
|
||||
]}.
|
||||
|
||||
|
|
Loading…
Reference in a new issue