diff --git a/.changeset/seven-rabbits-poke.md b/.changeset/seven-rabbits-poke.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/seven-rabbits-poke.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/workflows/health_checks.yml b/.github/workflows/health_checks.yml index 36dd88d9346..e9aafec01aa 100644 --- a/.github/workflows/health_checks.yml +++ b/.github/workflows/health_checks.yml @@ -436,6 +436,7 @@ jobs: check_package_versions: if: github.event_name == 'pull_request' runs-on: ubuntu-latest + timeout-minutes: 10 needs: - install steps: diff --git a/packages/integration-tests/src/amplify_auth_credentials_factory.ts b/packages/integration-tests/src/amplify_auth_credentials_factory.ts index a08b1455bd4..90773c67117 100644 --- a/packages/integration-tests/src/amplify_auth_credentials_factory.ts +++ b/packages/integration-tests/src/amplify_auth_credentials_factory.ts @@ -16,16 +16,17 @@ import { AsyncLock } from './async_lock.js'; * This class is safe to use in concurrent settings, i.e. tests running in parallel. */ export class AmplifyAuthCredentialsFactory { - private readonly userPoolId: string; - private readonly userPoolClientId: string; - private readonly identityPoolId: string; - private readonly allowGuestAccess: boolean | undefined; /** * Asynchronous lock is used to assure that all calls to Amplify JS library are * made in single transaction. This is because that library maintains global state, * for example auth session. */ - private readonly lock: AsyncLock = new AsyncLock(60 * 1000); + private static readonly lock: AsyncLock = new AsyncLock(60 * 1000); + + private readonly userPoolId: string; + private readonly userPoolClientId: string; + private readonly identityPoolId: string; + private readonly allowGuestAccess: boolean | undefined; /** * Creates Amplify Auth credentials factory. @@ -47,7 +48,7 @@ export class AmplifyAuthCredentialsFactory { iamCredentials: IamCredentials; accessToken: string; }> => { - await this.lock.acquire(); + await AmplifyAuthCredentialsFactory.lock.acquire(); try { const username = `amplify-backend-${shortUuid()}@amazon.com`; const temporaryPassword = `Test1@Temp${shortUuid()}`; @@ -103,12 +104,12 @@ export class AmplifyAuthCredentialsFactory { accessToken: authSession.tokens.accessToken.toString(), }; } finally { - this.lock.release(); + AmplifyAuthCredentialsFactory.lock.release(); } }; getGuestAccessCredentials = async (): Promise => { - await this.lock.acquire(); + await AmplifyAuthCredentialsFactory.lock.acquire(); try { Amplify.configure({ Auth: { @@ -131,7 +132,7 @@ export class AmplifyAuthCredentialsFactory { return authSession.credentials; } finally { - this.lock.release(); + AmplifyAuthCredentialsFactory.lock.release(); } }; }