diff --git a/scripts/smokeTests.sh b/scripts/smokeTests.sh index 70df7c77a27..5f1c29e8ebe 100755 --- a/scripts/smokeTests.sh +++ b/scripts/smokeTests.sh @@ -46,15 +46,15 @@ trap 'rm -f "$OUTFILE"' EXIT echo "Using temporary output file: $OUTFILE" # Add timeout configuration -TIMEOUT=30 -INTERVAL=0.5 +TIMEOUT=300 # Represent 30 seconds as 300 tenths of a second +INTERVAL=5 # Represent 0.5 seconds as 5 tenths of a second TIMER=0 ( # Wait for the ready message with timeout while true; do - if [[ $TIMER -ge $TIMEOUT ]]; then - echo "Error: Timeout waiting for application to start after $TIMEOUT seconds" + if (( TIMER >= TIMEOUT )); then + echo "Error: Timeout waiting for application to start after $((TIMEOUT / 10)) seconds" kill $$ exit 1 fi @@ -64,8 +64,8 @@ TIMER=0 break fi - sleep $INTERVAL - TIMER=$(echo "$TIMER + $INTERVAL" | bc) + sleep 0.5 + TIMER=$((TIMER + INTERVAL)) done ) | pnpm start --character=characters/trump.character.json > "$OUTFILE" & @@ -89,4 +89,4 @@ if grep -q "Terminating and cleaning up resources..." "$OUTFILE"; then else echo "Error: The output does not contain the expected termination message." exit 1 -fi \ No newline at end of file +fi