diff --git a/packages/client-sdk-nodejs/test/integration/integration-setup.ts b/packages/client-sdk-nodejs/test/integration/integration-setup.ts index 478871f3e..a6cfb8ba4 100644 --- a/packages/client-sdk-nodejs/test/integration/integration-setup.ts +++ b/packages/client-sdk-nodejs/test/integration/integration-setup.ts @@ -75,7 +75,8 @@ function sessionCredsProvider(): CredentialProvider { export function integrationTestCacheClientProps(): CacheClientProps { return { - configuration: Configurations.Laptop.latest(), + configuration: + Configurations.Laptop.latest().withClientTimeoutMillis(60000), credentialProvider: credsProvider(), defaultTtlSeconds: 1111, }; diff --git a/packages/common-integration-tests/src/auth-client.ts b/packages/common-integration-tests/src/auth-client.ts index b09541d6e..e64414c72 100644 --- a/packages/common-integration-tests/src/auth-client.ts +++ b/packages/common-integration-tests/src/auth-client.ts @@ -69,18 +69,18 @@ export function runAuthClientTests( const secondsSinceEpoch = Math.round(Date.now() / 1000); const expireResponse = await sessionTokenAuthClient.generateApiKey( SUPER_USER_PERMISSIONS, - ExpiresIn.seconds(10) + ExpiresIn.minutes(5) ); - const expiresIn = secondsSinceEpoch + 10; - expect(expireResponse).toBeInstanceOf(GenerateApiKey.Success); + const expiresIn = secondsSinceEpoch + 300; + expect(expireResponse).toBeInstanceOf(GenerateApiKey.Success); const expireResponseSuccess = expireResponse as GenerateApiKey.Success; expect(expireResponseSuccess.is_success); expect(expireResponseSuccess.expiresAt.doesExpire()); expect(expireResponseSuccess.expiresAt.epoch()).toBeWithin( - expiresIn - 1, - expiresIn + 2 + expiresIn - 60, + expiresIn + 60 ); });