From 830acef847ec5f77edf824cd849760383926c36a Mon Sep 17 00:00:00 2001 From: Michael Li Date: Tue, 16 Sep 2025 17:50:11 -0400 Subject: [PATCH] test(e2e): Make role creation sequential (#3003) When running this test against an AWS cluster, this operation was resulting in 504s. This was potentially hitting some AWS rate limits when making these requests concurrently. --- e2e-tests/admin/tests/sorting.spec.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/e2e-tests/admin/tests/sorting.spec.js b/e2e-tests/admin/tests/sorting.spec.js index e4532ffc4..48ab331c0 100644 --- a/e2e-tests/admin/tests/sorting.spec.js +++ b/e2e-tests/admin/tests/sorting.spec.js @@ -41,16 +41,16 @@ test.beforeEach(async ({ apiClient }) => { }); // create roles with specific names - const roles = await Promise.all( - roleNamesToCreate.map((roleName) => { - return apiClient.clients.Role.roleServiceCreateRole({ - item: { - scopeId: org.id, - name: roleName, - }, - }); - }), - ); + const roles = []; + for (const roleName of roleNamesToCreate) { + const role = await apiClient.clients.Role.roleServiceCreateRole({ + item: { + scopeId: org.id, + name: roleName, + }, + }); + roles.push(role); + } // collect all roles and data so that sorting can be tested based on the underlying data rolesSortedByCreatedTime = roles.toSorted((a, b) => {