@camunda/e2e-test-suite 0.0.1204 → 0.0.1205
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.
- package/dist/utils/apiHelpers.js +14 -3
- package/package.json +1 -1
package/dist/utils/apiHelpers.js
CHANGED
|
@@ -772,6 +772,16 @@ async function performOptimizeInteractiveLogin(page, callerLabel, verifySession)
|
|
|
772
772
|
if (loginAttempt < maxLoginAttempts - 1) {
|
|
773
773
|
const rateLimited = String(error).includes(utils_1.AUTH0_RATE_LIMIT);
|
|
774
774
|
const unauthenticated = String(error).includes(OPTIMIZE_SESSION_UNAUTHENTICATED);
|
|
775
|
+
// loginToApp rethrows a bare Playwright TimeoutError when its own
|
|
776
|
+
// page.waitForURL never sees the post-login redirect land (run
|
|
777
|
+
// 35340608406, optimize-collections-api.spec.ts "Delete non-existent
|
|
778
|
+
// collection"). That is the same sso-callback rejection burst the
|
|
779
|
+
// "unauthenticated" branch below backs off for -- Auth0 answered the
|
|
780
|
+
// login but the redirect back to Optimize never completed -- so it
|
|
781
|
+
// needs the same growing backoff, not the flat 10-20s fallback below
|
|
782
|
+
// meant for genuinely unclassified errors. Without this, that attempt
|
|
783
|
+
// just retried straight back into the same burst.
|
|
784
|
+
const navigationTimeout = String(error).includes('waitForURL');
|
|
775
785
|
console.warn(`${callerLabel}: login attempt ${loginAttempt + 1} failed, retrying after backoff...`, error);
|
|
776
786
|
await page.goto('about:blank');
|
|
777
787
|
if (rateLimited) {
|
|
@@ -780,7 +790,7 @@ async function performOptimizeInteractiveLogin(page, callerLabel, verifySession)
|
|
|
780
790
|
// the same window and burns the attempt budget for nothing.
|
|
781
791
|
await (0, randomSleep_1.randomSleep)(60000, 90000);
|
|
782
792
|
}
|
|
783
|
-
else if (unauthenticated) {
|
|
793
|
+
else if (unauthenticated || navigationTimeout) {
|
|
784
794
|
// The rejected callbacks come in bursts lasting tens of seconds
|
|
785
795
|
// (every login inside the burst window fails, isolated ones all
|
|
786
796
|
// succeed), so back off past the burst rather than retrying inside
|
|
@@ -789,8 +799,9 @@ async function performOptimizeInteractiveLogin(page, callerLabel, verifySession)
|
|
|
789
799
|
// the same distribution at the same moment, so a fixed band keeps
|
|
790
800
|
// the herd synchronised and they re-collide on the next attempt.
|
|
791
801
|
// Growing the ceiling fans them out while the floor still lets a
|
|
792
|
-
// lucky worker recover quickly. Worst case
|
|
793
|
-
//
|
|
802
|
+
// lucky worker recover quickly. Worst case (3 retries at the
|
|
803
|
+
// ceiling, plus the initial stagger) stays under 6 minutes, well
|
|
804
|
+
// inside the 12-minute test timeout.
|
|
794
805
|
await (0, randomSleep_1.randomSleep)(20000, 45000 + loginAttempt * 45000);
|
|
795
806
|
}
|
|
796
807
|
else {
|