Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removing comments & whitespace

  • Loading branch information...
commit 9876ad83cf0c4aaa51753b9ce824c2a43cc9de13 1 parent 2367127
@ferd authored
Showing with 0 additions and 193 deletions.
  1. +0 −193 test/lager_test_backend_dedup.erl
View
193 test/lager_test_backend_dedup.erl
@@ -528,196 +528,6 @@ error_logger_redirect_crash_test_() ->
TestBody("bad record",badrecord,"gen_server crash terminated with reason: bad record state in crash:handle_call/3"),
TestBody("noproc",noproc,"gen_server crash terminated with reason: no such process or port in call to gen_event:call(foo, bar, baz)"),
TestBody("badfun",badfun,"gen_server crash terminated with reason: bad function booger in crash:handle_call/3")
-% {"bad return value",
-% fun() ->
-% Pid = whereis(crash),
-% crash(bad_return),
-% {_, _, Msg, _Meta} = pop(),
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: bad return value: bleh", [Pid])),
-% ?assertEqual(Expected, lists:flatten(Msg))
-% end
-% },
-% {"bad return value with string",
-% fun() ->
-% Pid = whereis(crash),
-% crash(bad_return_string),
-% count(),
-% %% We need to pop twice, because the buffering imposed
-% %% by the deduper swaps messages that the
-% %% lager_test_backend suite receives in reverse.
-% {_, _, Msg1} = pop(),
-% {_, _, Msg2} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: bad return value: {tuple,{tuple,\"string\"}}", [Pid])),
-% ?assert(lists:member(Expected, Received))
-% end
-% },
-% {"bad return value uncaught throw",
-% fun() ->
-% Pid = whereis(crash),
-% crash(throw),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: bad return value: a_ball", [Pid])),
-% ?assert(lists:member(Expected, Received))
-% end
-% },
-% {"case clause",
-% fun() ->
-% Pid = whereis(crash),
-% crash(case_clause),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: no case clause matching {} in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"case clause string",
-% fun() ->
-% Pid = whereis(crash),
-% crash(case_clause_string),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: no case clause matching \"crash\" in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"function clause",
-% fun() ->
-% Pid = whereis(crash),
-% crash(function_clause),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: no function clause matching crash:function({})", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"if clause",
-% fun() ->
-% Pid = whereis(crash),
-% crash(if_clause),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: no true branch found while evaluating if expression in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"try clause",
-% fun() ->
-% Pid = whereis(crash),
-% crash(try_clause),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: no try clause matching [] in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"undefined function",
-% fun() ->
-% Pid = whereis(crash),
-% crash(undef),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: call to undefined function crash:booger/0 from crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"bad math",
-% fun() ->
-% Pid = whereis(crash),
-% crash(badarith),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: bad arithmetic expression in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"bad match",
-% fun() ->
-% Pid = whereis(crash),
-% crash(badmatch),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: no match of right hand value {} in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"bad arity",
-% fun() ->
-% Pid = whereis(crash),
-% crash(badarity),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: fun called with wrong arity of 1 instead of 3 in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"bad arg1",
-% fun() ->
-% Pid = whereis(crash),
-% crash(badarg1),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: bad argument in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"bad arg2",
-% fun() ->
-% Pid = whereis(crash),
-% crash(badarg2),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: bad argument in call to erlang:iolist_to_binary([\"foo\",bar]) in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"bad record",
-% fun() ->
-% Pid = whereis(crash),
-% crash(badrecord),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: bad record state in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% },
-% {"noproc",
-% fun() ->
-% Pid = whereis(crash),
-% crash(noproc),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: no such process or port in call to gen_event:call(foo, bar, baz)", [Pid])),
-% ?assert(lists:member(Expected, Received))
-% end
-% },
-% {"badfun",
-% fun() ->
-% Pid = whereis(crash),
-% crash(badfun),
-% {_, _, Msg1, _} = pop(),
-% {_, _, Msg2, _} = pop(),
-% Received = [lists:flatten(Msg) || Msg <- [Msg1, Msg2]],
-% Expected = lists:flatten(io_lib:format("[error] ~w gen_server crash terminated with reason: bad function booger in crash:handle_call/3", [Pid])),
-% test_multi_body(Expected, Received)
-% end
-% }
-
]
}.
@@ -1128,6 +938,3 @@ safe_format_test() ->
ok.
-endif.
-
-
-
Please sign in to comment.
Something went wrong with that request. Please try again.