chore(tests): fix tests error for web hook

This commit is contained in:
zhanghongtong 2021-04-15 21:42:38 +08:00 committed by turtleDeng
parent 0090295a17
commit 53992ba138
1 changed files with 5 additions and 2 deletions

View File

@ -21,6 +21,9 @@
%%--------------------------------------------------------------------
start_link() ->
stop_http(),
stop_https(),
timer:sleep(100),
gen_server:start_link(?MODULE, [], []).
init([]) ->
@ -74,11 +77,11 @@ start_https(Port) ->
io:format(standard_error, "[TEST LOG] Start https server on 8888 successfully!~n", []).
stop_http() ->
ok = cowboy:stop_listener(http),
cowboy:stop_listener(http),
io:format("[TEST LOG] Stopped http server on 9999").
stop_https() ->
ok = cowboy:stop_listener(https),
cowboy:stop_listener(https),
io:format("[TEST LOG] Stopped https server on 8888").
compile_router() ->