Skip to content

Commit

Permalink
Don't keep proxy_block process if checkout fails
Browse files Browse the repository at this point in the history
  • Loading branch information
hanssv committed Oct 4, 2017
1 parent 9792071 commit 02fa1dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/poolboy_statem.erl
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,10 @@ worker_proxy_loop() ->
end.

worker_proxy_block(From, Ref, Pool) ->
From ! {Ref, (catch poolboy:checkout(Pool, true, 100))},
timer:sleep(10000).
Res = (catch poolboy:checkout(Pool, true, 100)),
From ! {Ref, Res},
%% If we checked out a worker - make sure to hang around until the end of the test...
[ timer:sleep(10000) || is_exit(Res) /= true ].

-endif.
-endif.

0 comments on commit 02fa1dd

Please sign in to comment.