-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output logs when failures happen but not in a test #104
Conversation
0a5e632
to
a325e60
Compare
a325e60
to
bb58e66
Compare
testResults.filter(testResult => { | ||
if (testResult.Action === 'fail') { | ||
if (testResult.Test) { | ||
names.push(testResult.Test) | ||
} else { | ||
// we got a failure without a test failure | ||
packageFailure = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tateexon I'm wondering if this case is expected and if we'll always fall through to this case?
When I was reviewing the output for the flakey test runner I put together, I had to handle both cases because:
- if a test fails, you'll always get output saying the package failed
- a package could fail without a test failing (eg. in the case of the test spinning off a goroutine and panicing -- go can't trace the goroutine back to its originating test so just fails the package IIRC).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am handling this above in the main function https://github.com/smartcontractkit/chainlink-github-actions/pull/104/files#diff-c7f06bc3c11b303038bdf62606b11c5bbbb495340e36f01702aaf4b39cebe347R29-R38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my comment is the problem here, will update the comment to make more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment in code has been updated to make more sense.
b7bb85a
to
9ccb362
Compare
There is a corner case in go test results where the test run can fail but there are no test specified failures in the logs. We don't have a great way to pull out what caused it so in this case we just print out all the output.