Skip to content

Commit

Permalink
update output log level, output log on error, increase timeout to 2 m…
Browse files Browse the repository at this point in the history
…inutes
  • Loading branch information
odilitime committed Jan 23, 2025
1 parent 1cb35df commit 85dd672
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/smokeTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ trap 'rm -f "$OUTFILE"' EXIT
echo "Using temporary output file: $OUTFILE"

# Add timeout configuration
TIMEOUT=600 # 60 seconds represented as 600 tenths of a second
TIMEOUT=1200 # 60 seconds represented as 600 tenths of a second
INTERVAL=5 # Represent 0.5 seconds as 5 tenths of a second
TIMER=0

# Start the application and capture logs in the background
pnpm start --character=characters/trump.character.json > "$OUTFILE" 2>&1 &
# 27 includes success and that's what the level we're looking for is
DEFAULT_LOG_LEVEL=success pnpm start --character=characters/trump.character.json > "$OUTFILE" 2>&1 &

APP_PID=$! # Capture the PID of the background process

Expand All @@ -62,6 +63,7 @@ APP_PID=$! # Capture the PID of the background process
while true; do
if (( TIMER >= TIMEOUT )); then
>&2 echo "ERROR: Timeout waiting for application to start after $((TIMEOUT / 10)) seconds"
cat $OUTFILE
kill $APP_PID # Terminate the pnpm process
exit 1
fi
Expand Down

0 comments on commit 85dd672

Please sign in to comment.