-
-
Save aronisstav/b67df16361cd9a2fa87e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Extracted and adapted for use with Concuerror from | |
%% https://github.com/devinus/poolboy/blob/1.2.1/test/poolboy_tests.erl | |
-module(poolboy_tests_1). | |
-export([pool_startup/0, pool_startup_no_stop/0]). | |
pool_startup() -> | |
{ok, Pid} = new_pool(1, 0), | |
ok = pool_call(Pid, stop). | |
new_pool(Size, MaxOverflow) -> | |
poolboy:start_link([{name, {local, poolboy_test}}, | |
{worker_module, poolboy_test_worker}, | |
{size, Size}, {max_overflow, MaxOverflow}]). | |
pool_call(ServerRef, Request) -> | |
gen_server:call(ServerRef, Request). | |
pool_startup_no_stop() -> | |
new_pool_no_link(1, 0). | |
new_pool_no_link(Size, MaxOverflow) -> | |
poolboy:start([{name, {local, poolboy_test}}, | |
{worker_module, poolboy_test_worker}, | |
{size, Size}, {max_overflow, MaxOverflow}]). | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment