1
0
mirror of https://github.com/apple/foundationdb.git synced 2025-06-01 10:45:56 +08:00

Merge pull request from sfc-gh-ajbeamon/fix-token-unit-test

Fix bug in token cache unit test where the expiration time was underflowing
This commit is contained in:
A.J. Beamon 2022-07-30 15:40:14 -07:00 committed by GitHub
commit eeefb12f14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -265,7 +265,7 @@ TEST_CASE("/fdbrpc/authz/TokenCache/BadTokens") {
},
{
[](Arena&, IRandom& rng, authz::jwt::TokenRef& token) {
token.expiresAtUnixTime = uint64_t(g_network->timer() - 10 - rng.random01() * 50);
token.expiresAtUnixTime = uint64_t(std::max<double>(g_network->timer() - 10 - rng.random01() * 50, 0));
},
"ExpiredToken",
},