test(authz-jwt): fix flaky test t_check_expire

This commit is contained in:
JianBo He 2022-04-29 11:21:28 +08:00
parent 1597ea50c1
commit 4989ce7a0d
1 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ t_check_expire(_Config) ->
Payload = #{ Payload = #{
<<"username">> => <<"username">>, <<"username">> => <<"username">>,
<<"acl">> => #{<<"sub">> => [<<"a/b">>]}, <<"acl">> => #{<<"sub">> => [<<"a/b">>]},
<<"exp">> => erlang:system_time(second) + 1 <<"exp">> => erlang:system_time(second) + 5
}, },
JWT = generate_jws(Payload), JWT = generate_jws(Payload),
@ -270,7 +270,7 @@ t_check_expire(_Config) ->
emqtt:unsubscribe(C, <<"a/b">>) emqtt:unsubscribe(C, <<"a/b">>)
), ),
timer:sleep(2000), timer:sleep(6000),
?assertMatch( ?assertMatch(
{ok, #{}, [?RC_NOT_AUTHORIZED]}, {ok, #{}, [?RC_NOT_AUTHORIZED]},