@camunda/e2e-test-suite 0.0.643 → 0.0.644

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.
@@ -10799,15 +10799,19 @@ BPMN_EOF
10799
10799
 
10800
10800
  if [[ "$J2_RESTORE_SUCCESS" == "true" ]]; then
10801
10801
  # Wait for authorization change to propagate
10802
- sleep 3
10802
+ sleep 5
10803
10803
  TEST_CLIENT_TOKEN="$(get_client_token "$TEST_CLIENT_ID" "$TEST_CLIENT_SECRET")"
10804
-
10804
+
10805
10805
  # Step 6: HAPPY PATH - Create document as $CLIENT_ID client (should succeed)
10806
10806
  echo -e "\n${BLUE}Step 6: HAPPY PATH - Creating document as '$CLIENT_ID' client (expecting 201)${NC}"
10807
-
10808
- # Retry up to 5 times with 1 second between attempts (permission may need time to propagate)
10807
+
10808
+ # Retry up to 5 times with increasing delay; refresh token on each retry to
10809
+ # handle auth-cache propagation delays (permission store may lag behind token).
10809
10810
  happy_doc_status=""
10810
10811
  for retry in 1 2 3 4 5; do
10812
+ # Refresh token on each attempt — the permission change may not be reflected
10813
+ # in the Keycloak token cache until a new token is issued.
10814
+ TEST_CLIENT_TOKEN="$(get_client_token "$TEST_CLIENT_ID" "$TEST_CLIENT_SECRET")"
10811
10815
  DOC_TEST_CONTENT2="Authorization test document - with permission - $(date)"
10812
10816
  DOC_TEST_FILENAME2="auth-test-doc-happy-$(date +%s)-retry$retry.txt"
10813
10817
  DOC_TEST_TEMPFILE2="/tmp/$DOC_TEST_FILENAME2"
@@ -10864,12 +10868,12 @@ BPMN_EOF
10864
10868
  break
10865
10869
  else
10866
10870
  if [[ $retry -lt 5 ]]; then
10867
- echo " Retrying after 1 second..."
10868
- sleep 1
10871
+ echo " Retrying after 3 seconds..."
10872
+ sleep 3
10869
10873
  fi
10870
10874
  fi
10871
10875
  done
10872
-
10876
+
10873
10877
  # If all retries failed
10874
10878
  if [[ "$happy_doc_status" != "201" && "$happy_doc_status" != "200" ]]; then
10875
10879
  echo -e "${RED}✗ UNEXPECTED: Document creation failed after 5 retries with permission restored${NC}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camunda/e2e-test-suite",
3
- "version": "0.0.643",
3
+ "version": "0.0.644",
4
4
  "description": "End-to-end test helpers for Camunda 8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10799,15 +10799,19 @@ BPMN_EOF
10799
10799
 
10800
10800
  if [[ "$J2_RESTORE_SUCCESS" == "true" ]]; then
10801
10801
  # Wait for authorization change to propagate
10802
- sleep 3
10802
+ sleep 5
10803
10803
  TEST_CLIENT_TOKEN="$(get_client_token "$TEST_CLIENT_ID" "$TEST_CLIENT_SECRET")"
10804
-
10804
+
10805
10805
  # Step 6: HAPPY PATH - Create document as $CLIENT_ID client (should succeed)
10806
10806
  echo -e "\n${BLUE}Step 6: HAPPY PATH - Creating document as '$CLIENT_ID' client (expecting 201)${NC}"
10807
-
10808
- # Retry up to 5 times with 1 second between attempts (permission may need time to propagate)
10807
+
10808
+ # Retry up to 5 times with increasing delay; refresh token on each retry to
10809
+ # handle auth-cache propagation delays (permission store may lag behind token).
10809
10810
  happy_doc_status=""
10810
10811
  for retry in 1 2 3 4 5; do
10812
+ # Refresh token on each attempt — the permission change may not be reflected
10813
+ # in the Keycloak token cache until a new token is issued.
10814
+ TEST_CLIENT_TOKEN="$(get_client_token "$TEST_CLIENT_ID" "$TEST_CLIENT_SECRET")"
10811
10815
  DOC_TEST_CONTENT2="Authorization test document - with permission - $(date)"
10812
10816
  DOC_TEST_FILENAME2="auth-test-doc-happy-$(date +%s)-retry$retry.txt"
10813
10817
  DOC_TEST_TEMPFILE2="/tmp/$DOC_TEST_FILENAME2"
@@ -10864,12 +10868,12 @@ BPMN_EOF
10864
10868
  break
10865
10869
  else
10866
10870
  if [[ $retry -lt 5 ]]; then
10867
- echo " Retrying after 1 second..."
10868
- sleep 1
10871
+ echo " Retrying after 3 seconds..."
10872
+ sleep 3
10869
10873
  fi
10870
10874
  fi
10871
10875
  done
10872
-
10876
+
10873
10877
  # If all retries failed
10874
10878
  if [[ "$happy_doc_status" != "201" && "$happy_doc_status" != "200" ]]; then
10875
10879
  echo -e "${RED}✗ UNEXPECTED: Document creation failed after 5 retries with permission restored${NC}"