Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions scripts/objc-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ cleanup() {
fi
# kill whatever is occupying port 8081 (packager)
lsof -i tcp:8081 | awk 'NR!=1 {print $2}' | xargs kill
# kill whatever is occupying port 5555 (web socket server)
lsof -i tcp:5555 | awk 'NR!=1 {print $2}' | xargs kill
}

# Wait for the package to start
Expand All @@ -51,24 +49,6 @@ waitForPackager() {
echo "Packager is ready!"
}

waitForWebSocketServer() {
local -i max_attempts=60
local -i attempt_num=1

until curl -s http://localhost:5555 | grep "Upgrade Required" -q; do
if (( attempt_num == max_attempts )); then
echo "WebSocket Server did not respond in time. No more attempts left."
exit 1
else
(( attempt_num++ ))
echo "WebSocket Server did not respond. Retrying for attempt number $attempt_num..."
sleep 1
fi
done

echo "WebSocket Server is ready!"
}

runTests() {
# shellcheck disable=SC1091
source "$ROOT/scripts/.tests.env"
Expand Down Expand Up @@ -129,11 +109,6 @@ main() {
# Otherwise, just build RNTester and exit
if [ "$1" = "test" ]; then

# Start the WebSocket test server
echo "Launch WebSocket Server"
sh "./IntegrationTests/launchWebSocketServer.sh" &
waitForWebSocketServer

# Start the packager
yarn start --max-workers=1 || echo "Can't start packager automatically" &
waitForPackager
Expand Down
Loading