diff options
author | jdamanalo <[email protected]> | 2023-03-09 15:54:41 +0800 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2023-12-15 15:37:34 +0100 |
commit | a81dc8af9db314e074512e7fc096978c64c9bed1 (patch) | |
tree | 6baf1b170887c4d3ddeb40d3c3daf98031dc7b34 /test/sys_SUITE.erl | |
parent | a72bf4105f6751662ff00fed85bbdc22ee9c2b80 (diff) | |
download | cowboy-a81dc8af9db314e074512e7fc096978c64c9bed1.tar.gz cowboy-a81dc8af9db314e074512e7fc096978c64c9bed1.tar.bz2 cowboy-a81dc8af9db314e074512e7fc096978c64c9bed1.zip |
Add timeout to cowboy_loop
LH: I have added a test that does both hibernate and timeout
and fixed a related issue. I also tweaked the docs and tests.
Diffstat (limited to 'test/sys_SUITE.erl')
-rw-r--r-- | test/sys_SUITE.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/sys_SUITE.erl b/test/sys_SUITE.erl index e10491a..cd6cfa9 100644 --- a/test/sys_SUITE.erl +++ b/test/sys_SUITE.erl @@ -659,7 +659,7 @@ sys_get_state_loop(Config) -> timer:sleep(100), SupPid = get_remote_pid_tcp(Socket), [{_, Pid, _, _}] = supervisor:which_children(SupPid), - {Req, Env, long_polling_sys_h, undefined} = sys:get_state(Pid), + {Req, Env, long_polling_sys_h, undefined, infinity} = sys:get_state(Pid), #{pid := _, streamid := _} = Req, #{dispatch := _} = Env, ok. @@ -784,7 +784,7 @@ sys_replace_state_loop(Config) -> timer:sleep(100), SupPid = get_remote_pid_tcp(Socket), [{_, Pid, _, _}] = supervisor:which_children(SupPid), - {Req, Env, long_polling_sys_h, undefined} = sys:replace_state(Pid, fun(S) -> S end), + {Req, Env, long_polling_sys_h, undefined, infinity} = sys:replace_state(Pid, fun(S) -> S end), #{pid := _, streamid := _} = Req, #{dispatch := _} = Env, ok. |