test(authz-jwt): fix flaky test t_check_expire
This commit is contained in:
parent
1597ea50c1
commit
4989ce7a0d
|
@ -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]},
|
||||||
|
|
Loading…
Reference in New Issue