Skip to content

Commit 1ff6059

Browse files
committed
feat: enhance flaky test checker script with detailed failure handling
- Improved output for each test run by logging status (PASS/FAIL) for all iterations. - Implemented early exit on first failure, providing detailed output for diagnostics. - Included summary results display for passed and failed tests.
1 parent 9d51146 commit 1ff6059

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

ci/scripts/check_flaky_pgjson_test.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,27 @@ for i in $(seq 1 "$ITERATIONS"); do
3939
if [[ $cargo_exit -eq 0 ]]; then
4040
STATUS="PASS"
4141
PASS=$((PASS + 1))
42+
RESULTS+=(" Run $i: $STATUS")
43+
echo " Run $i: $STATUS"
4244
else
4345
STATUS="FAIL"
4446
FAIL=$((FAIL + 1))
45-
# Show the failure detail on the first failure for quick diagnosis
46-
if [[ $FAIL -eq 1 ]]; then
47-
echo ""
48-
echo "--- First failure output ---"
49-
echo "$output" | tail -40
50-
echo "----------------------------"
51-
echo ""
52-
fi
53-
fi
47+
RESULTS+=(" Run $i: $STATUS")
48+
echo " Run $i: $STATUS"
49+
50+
echo ""
51+
echo "--- First failure output ---"
52+
echo "$output" | tail -40
53+
echo "----------------------------"
54+
echo ""
5455

55-
RESULTS+=(" Run $i: $STATUS")
56-
echo " Run $i: $STATUS"
56+
echo "Stopping on first failure."
57+
echo ""
58+
echo "=== Results ==="
59+
echo " Passed : $PASS / $i"
60+
echo " Failed : $FAIL / $i"
61+
exit 1
62+
fi
5763
done
5864

5965
echo ""

0 commit comments

Comments
 (0)