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