From d260f7c4d6ee6b8c8bd3235e4c84f2984920b583 Mon Sep 17 00:00:00 2001 From: rddimon Date: Tue, 6 Feb 2024 17:21:38 +0200 Subject: [PATCH] AT-11105: Add comments https://amplify-education.atlassian.net/browse/AT-11105 --- test/integration-tests/debug/debug.test.ts | 1 + test/integration-tests/test-utilities.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/test/integration-tests/debug/debug.test.ts b/test/integration-tests/debug/debug.test.ts index 53373678..c0195ad8 100644 --- a/test/integration-tests/debug/debug.test.ts +++ b/test/integration-tests/debug/debug.test.ts @@ -16,6 +16,7 @@ describe("Integration Tests", function () { await utilities.createTempDir(TEMP_DIR, configFolder); await utilities.slsCreateDomain(TEMP_DIR, true); await utilities.slsDeploy(TEMP_DIR, true); + // run again to make sure the deployment is succeeded await utilities.slsDeploy(TEMP_DIR, true); } finally { await utilities.destroyResources(testName); diff --git a/test/integration-tests/test-utilities.ts b/test/integration-tests/test-utilities.ts index 4eeb2846..4219b75f 100644 --- a/test/integration-tests/test-utilities.ts +++ b/test/integration-tests/test-utilities.ts @@ -55,6 +55,7 @@ function slsCreateDomain (tempDir, debug: boolean = false) { * @returns {Promise} */ async function slsDeploy (tempDir, debug: boolean = false) { + // sleep to avoid `to many requests` error as we run a lot of tests one after another await sleep(5000); return exec(`cd ${tempDir} && npx serverless deploy` + (debug ? " --verbose" : "")); }