@camunda/e2e-test-suite 0.0.756 → 0.0.758
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -128,7 +128,28 @@ async function completeTaskWithRetry(page, taskPanelPage, taskDetailsPage, taskN
|
|
|
128
128
|
catch {
|
|
129
129
|
// No toast to dismiss
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
// A transient backend 500 while opening the task can leave the page on
|
|
132
|
+
// the raw Tasklist API URL (the JSON error renders as the top-level
|
|
133
|
+
// document). A bare reload then re-requests that broken URL and never
|
|
134
|
+
// restores the SPA, so every remaining attempt is wasted. Re-navigate
|
|
135
|
+
// to the Tasklist list — which uses a different endpoint than the
|
|
136
|
+
// single-task fetch that 500s — so the app re-mounts and the task can
|
|
137
|
+
// be re-opened once the blip clears. Progressive backoff gives the
|
|
138
|
+
// backend time to recover between attempts.
|
|
139
|
+
await (0, sleep_1.sleep)(2000 * (attempt + 1));
|
|
140
|
+
const orchestrationContextPath = process.env.ORCHESTRATION_CONTEXT_PATH ?? '/orchestration';
|
|
141
|
+
const normalizedOrchestrationPath = orchestrationContextPath.startsWith('/')
|
|
142
|
+
? orchestrationContextPath
|
|
143
|
+
: `/${orchestrationContextPath}`;
|
|
144
|
+
try {
|
|
145
|
+
await page.goto(`${normalizedOrchestrationPath}/tasklist`, {
|
|
146
|
+
timeout: 60000,
|
|
147
|
+
waitUntil: 'domcontentloaded',
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
await page.reload();
|
|
152
|
+
}
|
|
132
153
|
await page.waitForLoadState('networkidle');
|
|
133
154
|
}
|
|
134
155
|
else {
|
|
@@ -393,9 +393,32 @@ _curl_common() {
|
|
|
393
393
|
# with a short backoff. Without this, brief network blips during long test
|
|
394
394
|
# runs surface as empty responses (`<none>` status) and false-positive
|
|
395
395
|
# FAILEDs in print_result. --max-time still bounds total time per attempt.
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
396
|
+
#
|
|
397
|
+
# Outer gateway-retry loop: an nginx `502 Bad Gateway` / `504 Gateway
|
|
398
|
+
# Timeout` (or an empty/no-status response) is emitted by the ingress when
|
|
399
|
+
# it cannot reach the upstream orchestration REST API — e.g. while an
|
|
400
|
+
# orchestration pod is rolling during an upgrade-minor run. That is never a
|
|
401
|
+
# valid response to any assertion in this suite (the API returns JSON status
|
|
402
|
+
# bodies, never a bare nginx HTML page), so re-issue the whole request with
|
|
403
|
+
# capped backoff to ride out a brief upstream restart window. curl's own
|
|
404
|
+
# --retry budget (~4s) is too small for a pod restart; this widens it to
|
|
405
|
+
# ~90s. A sustained outage still returns the real 502/504 once the budget is
|
|
406
|
+
# exhausted, so it surfaces as a genuine FAILED (not masked).
|
|
407
|
+
local gw_attempt=0 gw_max=12 gw_response gw_status
|
|
408
|
+
while :; do
|
|
409
|
+
gw_response="$(curl --http1.1 --max-time 30 --connect-timeout 10 \
|
|
410
|
+
--retry 3 --retry-delay 1 --retry-connrefused --retry-all-errors \
|
|
411
|
+
-i -s -H 'Expect:' "$@")"
|
|
412
|
+
gw_status="$(echo "$gw_response" | grep -m1 -E '^HTTP/[0-9.]+' | awk '{print $2}' || true)"
|
|
413
|
+
if { [[ "$gw_status" != "502" && "$gw_status" != "504" && -n "$gw_status" ]]; } \
|
|
414
|
+
|| (( gw_attempt >= gw_max )); then
|
|
415
|
+
printf '%s\n' "$gw_response"
|
|
416
|
+
return 0
|
|
417
|
+
fi
|
|
418
|
+
gw_attempt=$((gw_attempt + 1))
|
|
419
|
+
# Backoff 2,4,6,8,10,10,... capped at 10s -> ~90s total across 12 attempts.
|
|
420
|
+
sleep $(( gw_attempt < 5 ? gw_attempt * 2 : 10 ))
|
|
421
|
+
done
|
|
399
422
|
}
|
|
400
423
|
|
|
401
424
|
# Helper to get curl -F argument for tenantId in multipart forms
|
|
@@ -111,30 +111,30 @@ if (process.env.IS_MIGRATION === 'true') {
|
|
|
111
111
|
(0, SM_8_10_1.test)('Assert Users Persist in Management Identity With Correct Roles @tasklistV2', async ({ managementIdentityPage, identityUsersPage, }) => {
|
|
112
112
|
await managementIdentityPage.clickUsersLink();
|
|
113
113
|
await identityUsersPage.assertUserIsAssignedCorrectRole('demo', [
|
|
114
|
-
'Console',
|
|
115
114
|
'Default user role',
|
|
116
115
|
'ManagementIdentity',
|
|
117
116
|
'Optimize',
|
|
118
117
|
'Orchestration',
|
|
119
118
|
'Web Modeler',
|
|
119
|
+
'Web Modeler Admin',
|
|
120
120
|
]);
|
|
121
121
|
await managementIdentityPage.clickUsersLink();
|
|
122
122
|
await identityUsersPage.assertUserIsAssignedCorrectRole('bart', [
|
|
123
|
-
'Console',
|
|
124
123
|
'Default user role',
|
|
125
124
|
'ManagementIdentity',
|
|
126
125
|
'Optimize',
|
|
127
126
|
'Orchestration',
|
|
128
127
|
'Web Modeler',
|
|
128
|
+
'Web Modeler Admin',
|
|
129
129
|
]);
|
|
130
130
|
await managementIdentityPage.clickUsersLink();
|
|
131
131
|
await identityUsersPage.assertUserIsAssignedCorrectRole('lisa', [
|
|
132
|
-
'Console',
|
|
133
132
|
'Default user role',
|
|
134
133
|
'ManagementIdentity',
|
|
135
134
|
'Optimize',
|
|
136
135
|
'Orchestration',
|
|
137
136
|
'Web Modeler',
|
|
137
|
+
'Web Modeler Admin',
|
|
138
138
|
]);
|
|
139
139
|
});
|
|
140
140
|
(0, SM_8_10_1.test)('Assert Demo User Can Deploy Processes', async ({ page, modelerHomePage, navigationPage, modelerCreatePage, operateHomePage, operateProcessesPage, operateProcessInstancePage, taskDetailsPage, taskPanelPage, }) => {
|
package/package.json
CHANGED
|
@@ -393,9 +393,32 @@ _curl_common() {
|
|
|
393
393
|
# with a short backoff. Without this, brief network blips during long test
|
|
394
394
|
# runs surface as empty responses (`<none>` status) and false-positive
|
|
395
395
|
# FAILEDs in print_result. --max-time still bounds total time per attempt.
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
396
|
+
#
|
|
397
|
+
# Outer gateway-retry loop: an nginx `502 Bad Gateway` / `504 Gateway
|
|
398
|
+
# Timeout` (or an empty/no-status response) is emitted by the ingress when
|
|
399
|
+
# it cannot reach the upstream orchestration REST API — e.g. while an
|
|
400
|
+
# orchestration pod is rolling during an upgrade-minor run. That is never a
|
|
401
|
+
# valid response to any assertion in this suite (the API returns JSON status
|
|
402
|
+
# bodies, never a bare nginx HTML page), so re-issue the whole request with
|
|
403
|
+
# capped backoff to ride out a brief upstream restart window. curl's own
|
|
404
|
+
# --retry budget (~4s) is too small for a pod restart; this widens it to
|
|
405
|
+
# ~90s. A sustained outage still returns the real 502/504 once the budget is
|
|
406
|
+
# exhausted, so it surfaces as a genuine FAILED (not masked).
|
|
407
|
+
local gw_attempt=0 gw_max=12 gw_response gw_status
|
|
408
|
+
while :; do
|
|
409
|
+
gw_response="$(curl --http1.1 --max-time 30 --connect-timeout 10 \
|
|
410
|
+
--retry 3 --retry-delay 1 --retry-connrefused --retry-all-errors \
|
|
411
|
+
-i -s -H 'Expect:' "$@")"
|
|
412
|
+
gw_status="$(echo "$gw_response" | grep -m1 -E '^HTTP/[0-9.]+' | awk '{print $2}' || true)"
|
|
413
|
+
if { [[ "$gw_status" != "502" && "$gw_status" != "504" && -n "$gw_status" ]]; } \
|
|
414
|
+
|| (( gw_attempt >= gw_max )); then
|
|
415
|
+
printf '%s\n' "$gw_response"
|
|
416
|
+
return 0
|
|
417
|
+
fi
|
|
418
|
+
gw_attempt=$((gw_attempt + 1))
|
|
419
|
+
# Backoff 2,4,6,8,10,10,... capped at 10s -> ~90s total across 12 attempts.
|
|
420
|
+
sleep $(( gw_attempt < 5 ? gw_attempt * 2 : 10 ))
|
|
421
|
+
done
|
|
399
422
|
}
|
|
400
423
|
|
|
401
424
|
# Helper to get curl -F argument for tenantId in multipart forms
|