@camunda/e2e-test-suite 0.0.1164 → 0.0.1165

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.
@@ -394,24 +394,31 @@ _curl_common() {
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
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).
397
+ # Outer gateway-retry loop: an nginx `502 Bad Gateway` / `503 Service
398
+ # Temporarily Unavailable` / `504 Gateway Timeout` (or an empty/no-status
399
+ # response) is emitted by the ingress when it cannot reach the upstream
400
+ # orchestration REST API — 502/504 when an upstream is reachable but not
401
+ # answering, 503 when the ingress has no ready endpoint at all (every
402
+ # orchestration pod unready, e.g. while a pod is rolling during an
403
+ # upgrade-minor run or while probes fail under the load this suite
404
+ # generates). Such a response is never a valid answer to any assertion in
405
+ # this suite (the API returns JSON status bodies, never a bare nginx HTML
406
+ # page), so re-issue the whole request with capped backoff to ride out a
407
+ # brief upstream restart window. curl's own --retry budget (~4s) is too
408
+ # small for a pod restart; this widens it to ~90s. A sustained outage still
409
+ # returns the real 502/503/504 once the budget is exhausted, so it surfaces
410
+ # as a genuine FAILED (not masked).
407
411
  local gw_attempt=0 gw_max=12 gw_response gw_status
408
412
  while :; do
409
413
  gw_response="$(curl --http1.1 --max-time 30 --connect-timeout 10 \
410
414
  --retry 3 --retry-delay 1 --retry-connrefused --retry-all-errors \
411
415
  -i -s -H 'Expect:' "$@")"
412
416
  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
417
+ if { [[ -n "$gw_status" && "$gw_status" != "502" \
418
+ && "$gw_status" != "503" && "$gw_status" != "504" ]] \
419
+ || { [[ "$gw_status" == "503" \
420
+ && "$gw_response" != *'<center>nginx</center>'* ]]; } \
421
+ || (( gw_attempt >= gw_max )); then
415
422
  printf '%s\n' "$gw_response"
416
423
  return 0
417
424
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.1164",
3
+ "version": "0.0.1165",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -394,24 +394,31 @@ _curl_common() {
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
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).
397
+ # Outer gateway-retry loop: an nginx `502 Bad Gateway` / `503 Service
398
+ # Temporarily Unavailable` / `504 Gateway Timeout` (or an empty/no-status
399
+ # response) is emitted by the ingress when it cannot reach the upstream
400
+ # orchestration REST API — 502/504 when an upstream is reachable but not
401
+ # answering, 503 when the ingress has no ready endpoint at all (every
402
+ # orchestration pod unready, e.g. while a pod is rolling during an
403
+ # upgrade-minor run or while probes fail under the load this suite
404
+ # generates). Such a response is never a valid answer to any assertion in
405
+ # this suite (the API returns JSON status bodies, never a bare nginx HTML
406
+ # page), so re-issue the whole request with capped backoff to ride out a
407
+ # brief upstream restart window. curl's own --retry budget (~4s) is too
408
+ # small for a pod restart; this widens it to ~90s. A sustained outage still
409
+ # returns the real 502/503/504 once the budget is exhausted, so it surfaces
410
+ # as a genuine FAILED (not masked).
407
411
  local gw_attempt=0 gw_max=12 gw_response gw_status
408
412
  while :; do
409
413
  gw_response="$(curl --http1.1 --max-time 30 --connect-timeout 10 \
410
414
  --retry 3 --retry-delay 1 --retry-connrefused --retry-all-errors \
411
415
  -i -s -H 'Expect:' "$@")"
412
416
  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
417
+ if { [[ -n "$gw_status" && "$gw_status" != "502" \
418
+ && "$gw_status" != "503" && "$gw_status" != "504" ]] \
419
+ || { [[ "$gw_status" == "503" \
420
+ && "$gw_response" != *'<center>nginx</center>'* ]]; } \
421
+ || (( gw_attempt >= gw_max )); then
415
422
  printf '%s\n' "$gw_response"
416
423
  return 0
417
424
  fi