test: fix test case flakyness
This commit is contained in:
parent
9e8a67fd68
commit
6fcb2fdb05
|
@ -18,6 +18,7 @@
|
||||||
-compile(nowarn_export_all).
|
-compile(nowarn_export_all).
|
||||||
|
|
||||||
-include_lib("eunit/include/eunit.hrl").
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
|
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
|
||||||
|
|
||||||
all() ->
|
all() ->
|
||||||
emqx_common_test_helpers:all(?MODULE).
|
emqx_common_test_helpers:all(?MODULE).
|
||||||
|
@ -86,8 +87,11 @@ t_clients(_) ->
|
||||||
timeout
|
timeout
|
||||||
end,
|
end,
|
||||||
?assertEqual(ok, Kick),
|
?assertEqual(ok, Kick),
|
||||||
AfterKickoutResponse2 = emqx_mgmt_api_test_util:request_api(get, Client2Path),
|
%% Client info is cleared after DOWN event
|
||||||
?assertEqual({error, {"HTTP/1.1", 404, "Not Found"}}, AfterKickoutResponse2),
|
?retry(_Interval = 100, _Attempts = 5, begin
|
||||||
|
AfterKickoutResponse2 = emqx_mgmt_api_test_util:request_api(get, Client2Path),
|
||||||
|
?assertEqual(AfterKickoutResponse2, {error, {"HTTP/1.1", 404, "Not Found"}})
|
||||||
|
end),
|
||||||
|
|
||||||
%% get /clients/:clientid/authorization/cache should have no authz cache
|
%% get /clients/:clientid/authorization/cache should have no authz cache
|
||||||
Client1AuthzCachePath = emqx_mgmt_api_test_util:api_path([
|
Client1AuthzCachePath = emqx_mgmt_api_test_util:api_path([
|
||||||
|
|
Loading…
Reference in New Issue