mumrah commented on PR #17121:
URL: https://github.com/apache/kafka/pull/17121#issuecomment-2335279790
> Could we check the create time of build/.../xml instead?
The trouble is, we may have some of the copied XML files, but not all of
them. For example, if all the tests finished except for `:core` we would have
several XML files in build/junit-xml, but not any from core.
---
The whole problem we're working around here is that there's no easy way to
distinguish between a timeout and some other failure in a GitHub step (a major
limitation, IMO). Another solution could be to use the Linux `timeout` command
to do our own timeout. With this approach, we just watch for a particular exit
code from `timeout` to determine if Gradle had an error or if it timed out.
It would be something like:
```
timeout 180 ./gradlew ...
RET=$?
if [[ $RET == 124 ]]; then
echo "timed out";
elif [[ $RET == 0 ]]; then
echo "ok";
else
echo "failed";
fi
```
Maybe we could capture the exit code and store it as a step output to be
read by the Parse JUnit step. WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]