Skip to content

Commit

Permalink
Improve cover metric
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgauth committed Jun 15, 2016
1 parent b79204a commit 4425e92
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
Binary file modified bin/rebar3
Binary file not shown.
15 changes: 13 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{cover_export_enabled, true}.
{cover_excl_mods, [
arithmetic_protocol,
arithmetic_tcp_client,
arithmetic_tcp_server,
arithmetic_udp_client,
arithmetic_udp_server,
shackle_bench,
shackle_client,
shackle_profile,
shackle_tests,
shackle_test_utils
]}.
{coveralls_coverdata, "_build/test/cover/eunit.coverdata"}.
{coveralls_service_name, "travis-ci"}.

Expand Down Expand Up @@ -48,8 +60,7 @@
{plugins, [
{coveralls,
{git, "https://github.com/markusn/coveralls-erl", {branch, "master"}}}
]},
{src_dirs, ["src", "test"]}
]}
]}
]}.

Expand Down
8 changes: 7 additions & 1 deletion test/shackle_tests.erl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ shackle_reconnect_test_() ->
shackle_pool:start(?POOL_NAME, ?CLIENT_TCP, [
{port, ?PORT},
{reconnect, true},
{reconnect_time_min, 1},
{socket_options, [
binary,
{packet, raw}
Expand Down Expand Up @@ -103,7 +104,12 @@ multiply_udp_subtest() ->
reconnect_subtest() ->
?assertEqual({error, no_socket}, arithmetic_tcp_client:add(1, 1)),
arithmetic_tcp_server:start(),
timer:sleep(3000),
timer:sleep(200),
?assertEqual(2, arithmetic_tcp_client:add(1, 1)),
arithmetic_tcp_server:stop(),
?assertEqual({error, socket_closed}, arithmetic_tcp_client:add(1, 1)),
arithmetic_tcp_server:start(),
timer:sleep(200),
?assertEqual(2, arithmetic_tcp_client:add(1, 1)).

%% utils
Expand Down

0 comments on commit 4425e92

Please sign in to comment.