Skip to content

Commit bb65a69

Browse files
Attempt to fix integration test flakiness (#2372)
add 60 sec timeout
1 parent 69f973a commit bb65a69

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

_integration-test/run.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,13 @@ echo "${_endgroup}"
8484

8585
echo "${_group}Running moar tests !!!"
8686
# Set up initial/required settings (InstallWizard request)
87+
export -f sentry_api_request get_csrf_token
8788
sentry_api_request "internal/options/?query=is:required" -X PUT --data '{"mail.use-tls":false,"mail.username":"","mail.port":25,"system.admin-email":"[email protected]","mail.password":"","system.url-prefix":"'"$SENTRY_TEST_HOST"'","auth.allow-registration":false,"beacon.anonymous":true}' >/dev/null
8889

89-
SENTRY_DSN=$(sentry_api_request "projects/sentry/internal/keys/" | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "public" && $4 ~ "^http" { print $4; exit; }')
90+
# Hacky way to get around test flakiness for now
91+
sleep 60
9092
# We ignore the protocol and the host as we already know those
93+
SENTRY_DSN=$(sentry_api_request "projects/sentry/internal/keys/" | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "public" && $4 ~ "^http" { print $4; exit; }')
9194
DSN_PIECES=($(echo $SENTRY_DSN | sed -ne 's|^https\{0,1\}://\([0-9a-z]\{1,\}\)@[^/]\{1,\}/\([0-9]\{1,\}\)$|\1 \2|p' | tr ' ' '\n'))
9295
SENTRY_KEY=${DSN_PIECES[0]}
9396
PROJECT_ID=${DSN_PIECES[1]}
@@ -101,7 +104,6 @@ echo "Creating test event..."
101104
curl -sf --data '{"event_id": "'"$TEST_EVENT_ID"'","level":"error","message":"a failure","extra":{"object":"42"}}' -H 'Content-Type: application/json' -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=$SENTRY_KEY, sentry_client=test-bash/0.1" "$SENTRY_TEST_HOST/api/$PROJECT_ID/store/" -o /dev/null
102105

103106
EVENT_PATH="projects/sentry/internal/events/$TEST_EVENT_ID/"
104-
export -f sentry_api_request get_csrf_token
105107
export SENTRY_TEST_HOST COOKIE_FILE EVENT_PATH
106108
printf "Getting the test event back"
107109
timeout 60 bash -c 'until $(sentry_api_request "$EVENT_PATH" -Isf -X GET -o /dev/null); do printf '.'; sleep 0.5; done'

0 commit comments

Comments
 (0)