mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-01 10:45:56 +08:00
Merge pull request #7744 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:
commit
eeefb12f14
@ -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",
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user