Skip to content

Commit 2125d90

Browse files
committed
set expiration time to buffer + 2 seconds
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
1 parent ed8da16 commit 2125d90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ray/rpc/authentication/tests/authentication_token_loader_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ TEST_F(AuthenticationTokenLoaderTest, TestJWTExpiration) {
362362
R"({"AUTH_MODE": "token", "ENABLE_K8S_TOKEN_AUTH": true})");
363363
AuthenticationTokenLoader::instance().ResetCache();
364364

365-
// Create a JWT that expires in 1 second
365+
// Create a JWT with expiration time buffer (300) + 2 seconds
366366
auto now = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
367-
int64_t exp = now + 1;
367+
int64_t exp = now + 302;
368368

369369
std::string header =
370370
"eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0"; // {"alg":"none","typ":"JWT"}

0 commit comments

Comments
 (0)