chore: remove unused code
This commit is contained in:
parent
f896fefa59
commit
6d9f780313
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
-module(emqx_ft_assembler).
|
-module(emqx_ft_assembler).
|
||||||
|
|
||||||
-include_lib("emqx/include/logger.hrl").
|
|
||||||
|
|
||||||
-export([start_link/2]).
|
-export([start_link/2]).
|
||||||
|
|
||||||
-behaviour(gen_statem).
|
-behaviour(gen_statem).
|
||||||
|
@ -142,16 +140,3 @@ pread(Node, Segment, St) ->
|
||||||
|
|
||||||
segsize(#{fragment := {segment, Info}}) ->
|
segsize(#{fragment := {segment, Info}}) ->
|
||||||
maps:get(size, Info).
|
maps:get(size, Info).
|
||||||
|
|
||||||
safe_apply(Callback, Result) ->
|
|
||||||
try apply(Callback, [Result]) of
|
|
||||||
_ -> ok
|
|
||||||
catch
|
|
||||||
Class:Reason:Stacktrace ->
|
|
||||||
?SLOG(error, #{
|
|
||||||
msg => "safe_apply_failed",
|
|
||||||
class => Class,
|
|
||||||
reason => Reason,
|
|
||||||
stacktrace => Stacktrace
|
|
||||||
})
|
|
||||||
end.
|
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
-compile(nowarn_export_all).
|
-compile(nowarn_export_all).
|
||||||
|
|
||||||
-include_lib("stdlib/include/assert.hrl").
|
-include_lib("stdlib/include/assert.hrl").
|
||||||
-include_lib("emqx/include/asserts.hrl").
|
|
||||||
|
|
||||||
all() -> emqx_common_test_helpers:all(?MODULE).
|
all() -> emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
|
@ -75,19 +74,6 @@ t_timeout(_Config) ->
|
||||||
emqx_ft_responder:ack(Key, oops)
|
emqx_ft_responder:ack(Key, oops)
|
||||||
).
|
).
|
||||||
|
|
||||||
% t_action_exception(_Config) ->
|
|
||||||
% Key = <<"test">>,
|
|
||||||
% DefaultAction = fun(K) -> error({oops, K}) end,
|
|
||||||
% ?assertWaitEvent(
|
|
||||||
% emqx_ft_responder:start(Key, DefaultAction, 10),
|
|
||||||
% #{?snk_kind := ft_timeout_action_applied, key := <<"test">>},
|
|
||||||
% 1000
|
|
||||||
% ),
|
|
||||||
% ?assertEqual(
|
|
||||||
% {error, not_found},
|
|
||||||
% emqx_ft_responder:ack(Key, oops)
|
|
||||||
% ).
|
|
||||||
|
|
||||||
t_unknown_msgs(_Config) ->
|
t_unknown_msgs(_Config) ->
|
||||||
{ok, Pid} = emqx_ft_responder:start(make_ref(), fun(_) -> ok end, 100),
|
{ok, Pid} = emqx_ft_responder:start(make_ref(), fun(_) -> ok end, 100),
|
||||||
Pid ! {unknown_msg, <<"test">>},
|
Pid ! {unknown_msg, <<"test">>},
|
||||||
|
|
Loading…
Reference in New Issue