From 7b480d5915c275e529abe1223285cd13044f9404 Mon Sep 17 00:00:00 2001 From: Shakker Nerd Date: Sat, 14 Dec 2024 12:27:35 +0000 Subject: [PATCH 1/2] fix: syntax error: invalid arithmetic operator --- scripts/smokeTests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/smokeTests.sh b/scripts/smokeTests.sh index 70df7c77a27..d44da25b0da 100755 --- a/scripts/smokeTests.sh +++ b/scripts/smokeTests.sh @@ -53,7 +53,7 @@ TIMER=0 ( # Wait for the ready message with timeout while true; do - if [[ $TIMER -ge $TIMEOUT ]]; then + if (( TIMER >= TIMEOUT * 10 )); then echo "Error: Timeout waiting for application to start after $TIMEOUT seconds" kill $$ exit 1 @@ -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 From 49ed796f56a59ea78fb36f8f809ee56c4ced3783 Mon Sep 17 00:00:00 2001 From: Shakker Nerd Date: Sat, 14 Dec 2024 12:32:57 +0000 Subject: [PATCH 2/2] fix: invalid arithmetic operator --- scripts/smokeTests.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/smokeTests.sh b/scripts/smokeTests.sh index d44da25b0da..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 >= TIMEOUT * 10 )); 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" &