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.
This commit is contained in:
Michael Li authored and GitHub committed 2025-09-16 17:50:11 -04:00
1 parent ee7c916494
commit 830acef847
1 file changed
+10 -10
+10 -10
View File
@@ -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) => {