@camunda/e2e-test-suite 0.0.488 → 0.0.490

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.
@@ -44,7 +44,7 @@ class NavigationPage {
44
44
  this.keyboardPageBanner = page.locator('#keycloak-bg');
45
45
  }
46
46
  async goTo(url, banner, sleepTimeout, { username = 'demo', password = process.env.DISTRO_QA_E2E_TESTS_IDENTITY_FIRSTUSER_PASSWORD ??
47
- 'demo', } = {}, maxRetries = 3) {
47
+ 'demo', } = {}, maxRetries = 5) {
48
48
  const startTime = Date.now();
49
49
  let timeout = constants_1._1_SECOND_IN_MS * 10;
50
50
  if (url === '/modeler') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.488",
3
+ "version": "0.0.490",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -4889,40 +4889,47 @@ if [[ -n "$UW_DEFINITION_KEY" ]]; then
4889
4889
 
4890
4890
  # Immediately suspend to catch initialization race condition
4891
4891
  # Use retry logic to handle eventual consistency (batch may not be indexed yet)
4892
- echo " Attempting immediate suspension (race condition test)..."
4893
- immediate_suspend_success=false
4894
- for suspend_retry in 1 2 3; do
4895
- immediate_suspend_response="$(call_api_json_no_tenant "POST" "/v2/batch-operations/$batch_key/suspension" "" 2>&1)"
4896
- immediate_suspend_status="$(echo "$immediate_suspend_response" | extract_status)"
4897
- immediate_suspend_body="$(echo "$immediate_suspend_response" | get_body)"
4898
- immediate_suspend_error="$(echo "$immediate_suspend_body" | jq -r '.message // .error // .detail // empty' 2>/dev/null)"
4899
-
4900
- if [[ "$immediate_suspend_status" == "204" ]]; then
4901
- echo " Immediate suspension successful (attempt $suspend_retry/3, status: 204)"
4902
- immediate_suspend_success=true
4903
- break
4904
- elif [[ "$immediate_suspend_status" == "404" ]]; then
4905
- if [[ $suspend_retry -lt 3 ]]; then
4906
- echo " Batch not yet indexed (404), retrying in 0.1s (attempt $suspend_retry/3)..."
4907
- sleep 0.1
4892
+ # Batch 1 is kept ACTIVE so the main suspension endpoint test (below) can use it;
4893
+ # only run the immediate-suspension race-condition test on batches 2 and 3.
4894
+ if [[ $batch_num -ne 1 ]]; then
4895
+ echo " Attempting immediate suspension (race condition test)..."
4896
+ immediate_suspend_success=false
4897
+ for suspend_retry in 1 2 3; do
4898
+ immediate_suspend_response="$(call_api_json_no_tenant "POST" "/v2/batch-operations/$batch_key/suspension" "" 2>&1)"
4899
+ immediate_suspend_status="$(echo "$immediate_suspend_response" | extract_status)"
4900
+ immediate_suspend_body="$(echo "$immediate_suspend_response" | get_body)"
4901
+ immediate_suspend_error="$(echo "$immediate_suspend_body" | jq -r '.message // .error // .detail // empty' 2>/dev/null)"
4902
+
4903
+ if [[ "$immediate_suspend_status" == "204" ]]; then
4904
+ echo " ✓ Immediate suspension successful (attempt $suspend_retry/3, status: 204)"
4905
+ immediate_suspend_success=true
4906
+ break
4907
+ elif [[ "$immediate_suspend_status" == "404" ]]; then
4908
+ if [[ $suspend_retry -lt 3 ]]; then
4909
+ echo " Batch not yet indexed (404), retrying in 0.1s (attempt $suspend_retry/3)..."
4910
+ sleep 0.1
4911
+ else
4912
+ echo " Immediate suspension failed after 3 attempts (still getting 404)"
4913
+ fi
4908
4914
  else
4909
- echo " Immediate suspension failed after 3 attempts (still getting 404)"
4910
- fi
4911
- else
4912
- echo " Immediate suspension status: $immediate_suspend_status"
4913
- if [[ -n "$immediate_suspend_error" ]]; then
4914
- echo " Immediate suspension error: $immediate_suspend_error"
4915
- if [[ "$immediate_suspend_error" =~ "foreign-key constraint"|"BATCH_OPERATION_CHUNKS"|"ZeebeDbInconsistentException"|"concurrent modification"|"already exists" ]]; then
4916
- echo -e " ${RED}⚠ POTENTIAL RACE CONDITION DETECTED during immediate suspension of batch $batch_num!${NC}"
4917
- immediate_suspend_success=true # Race condition detected is a "success" for our test
4915
+ echo " Immediate suspension status: $immediate_suspend_status"
4916
+ if [[ -n "$immediate_suspend_error" ]]; then
4917
+ echo " Immediate suspension error: $immediate_suspend_error"
4918
+ if [[ "$immediate_suspend_error" =~ "foreign-key constraint"|"BATCH_OPERATION_CHUNKS"|"ZeebeDbInconsistentException"|"concurrent modification"|"already exists" ]]; then
4919
+ echo -e " ${RED}⚠ POTENTIAL RACE CONDITION DETECTED during immediate suspension of batch $batch_num!${NC}"
4920
+ immediate_suspend_success=true # Race condition detected is a "success" for our test
4921
+ fi
4918
4922
  fi
4923
+ break
4919
4924
  fi
4920
- break
4925
+ done
4926
+
4927
+ if [[ "$immediate_suspend_success" == "false" ]]; then
4928
+ echo " ⚠ Could not immediately suspend batch $batch_num (eventual consistency delay)"
4921
4929
  fi
4922
- done
4923
-
4924
- if [[ "$immediate_suspend_success" == "false" ]]; then
4925
- echo " ⚠ Could not immediately suspend batch $batch_num (eventual consistency delay)"
4930
+ else
4931
+ # Batch 1 stays ACTIVE so the main suspension endpoint test can test it
4932
+ immediate_suspend_success=false
4926
4933
  fi
4927
4934
  else
4928
4935
  echo " Failed to get batch operation key"