Skip to content

Commit

Permalink
I guess people like tests or something
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgolick committed Jul 4, 2012
1 parent 99be235 commit 4fcc2bd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/poolboy_tests.erl
Expand Up @@ -50,6 +50,9 @@ pool_test_() ->
},
{<<"Worker checked-in after an exception in a transaction">>,
fun checkin_after_exception_in_transaction/0
},
{<<"Pool returns status">>,
fun pool_returns_status/0
}
]
}.
Expand Down Expand Up @@ -363,6 +366,11 @@ checkin_after_exception_in_transaction() ->
?assertEqual(2, length(?sync(Pool, get_avail_workers))),
ok = ?sync(Pool, stop).

pool_returns_status() ->
{ok, Pool} = new_pool(2, 0),
?assertEqual({ready, 2, 0, 0}, poolboy:status(Pool)),
ok = ?sync(Pool, stop).

new_pool(Size, MaxOverflow) ->
poolboy:start_link([{name, {local, poolboy_test}},
{worker_module, poolboy_test_worker},
Expand Down

0 comments on commit 4fcc2bd

Please sign in to comment.