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
6 changes: 3 additions & 3 deletions .github/workflows/repeat-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ jobs:
if: ${{ !cancelled() }}
- name: Archive build results
uses: actions/upload-artifact@v4
if: always()
if: ${{ failure() }}
with:
name: result-${{ env.TEST_CLASS }}-split-${{ matrix.split }}
name: result-${{ github.run_number }}-${{ github.run_id }}-split-${{ matrix.split }}
path: target/unit
count-failures:
if: ${{ always() }}
if: ${{ failure() }}
needs: test
runs-on: ubuntu-20.04
steps:
Expand Down
6 changes: 6 additions & 0 deletions dev-support/checks/unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ for i in $(seq 1 ${ITERATIONS}); do
fi

if [[ ${ITERATIONS} -gt 1 ]]; then
if ! grep -q "Running .*Test" "${REPORT_DIR}/output.log"; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pattern "Running .*Test" assume that the test name contains Test; e.g.

$grep "Running .*Test" ~/Downloads/result-3-9475609402-split-16/iteration4/output.log 
[INFO] Running org.apache.hadoop.fs.ozone.TestHSync

It may be better to grep "Tests run: [1-9]".

$grep "Tests run: [1-9]" ~/Downloads/result-3-9475609402-split-16/iteration4/output.log 
[ERROR] Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 154.095 s <<< FAILURE! - in org.apache.hadoop.fs.ozone.TestHSync
[ERROR] Tests run: 10, Failures: 0, Errors: 1, Skipped: 0

Then, it will work for any test names.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @szetszwo for the review.

Tests run: is not printed if there is a fork timeout (Ozone used to have a similar pattern before HDDS-10545).

[INFO] Running org.apache.hadoop.ozone.client.rpc.TestECKeyOutputStreamWithZeroCopy
[INFO] 
[INFO] Results:
...
... There was a timeout or other error in the fork

While this workflow allows any test to be run, Ratis limits test naming by:

ratis/pom.xml

Lines 647 to 649 in dac27e4

<includes>
<include>**/Test*.java</include>
</includes>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for the info.

echo "No tests were run" >> "${REPORT_DIR}/summary.txt"
irc=1
FAIL_FAST=true
fi

if [[ ${irc} == 0 ]]; then
rm -fr "${REPORT_DIR}"
fi
Expand Down