Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 8 additions & 3 deletions acceptance/cmd/workspace/apps/run-local-node/script
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ cd app
# so we don't need to start it in background. It will install the dependencies as part of the command
trace $CLI apps run-local --prepare-environment --entry-point test.yml 2>&1 | grep -w "Hello, world"

PORT=8080
DEBUG_PORT=5252
PROXY_PORT=8081
# Function to find a free port in safe range
get_free_port() {
python3 -c "import socket,random; port=random.randint(49152,65535); s=socket.socket(); s.bind(('',port)); print(port); s.close()" 2>/dev/null || python3 -c "import socket; s=socket.socket(); s.bind(('',0)); print(s.getsockname()[1]); s.close()"
}

PORT=$(get_free_port)
DEBUG_PORT=$(get_free_port)
PROXY_PORT=$(get_free_port)

cleanup() {
# Kill any still running processes on these ports when the script exits
Expand Down
2 changes: 1 addition & 1 deletion acceptance/selftest/timeout/output.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

>>> sleep 2
>>> sleep 4

Error: Test script killed due to a timeout
2 changes: 1 addition & 1 deletion acceptance/selftest/timeout/script
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
trace sleep 2
trace sleep 4
echo "This is never printed"
9 changes: 4 additions & 5 deletions acceptance/selftest/timeout/test.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Manually check that test takes about 0.1s:
# PASS: TestAccept/selftest/timeout (0.10s)
Timeout = '100ms'
TimeoutWindows = '300ms'
TimeoutCloud = '300ms'
# Test that timeout mechanism works (script sleeps 4s but should be killed much sooner)
Timeout = '500ms'
TimeoutWindows = '500ms'
TimeoutCloud = '500ms'
2 changes: 1 addition & 1 deletion acceptance/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Local = true
Cloud = false

# default timeouts
Timeout = '20s'
Timeout = '30s'
TimeoutWindows = '60s'

# Slowest test I saw:
Expand Down
Loading