You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed that some successful tests get marked as failures in our CI. I noticed that if the --- PASS: final line indicator is preceded by other log information, the test is marked as fail with -0.0 run_time.
The issue happens somewhat rarely - 10 builds out of 105 builds in my sample.
The logs are output of a processes that is spawned from the test and directly writes to Stderr. My theory is that the process is killed before the new line is flushed and result into contaminating go test output. In all of my observations, the go test success indicator ended the line, I haven't noticed any case where the process final log output surrounded go test indicator. I've updated our project to ensure the process is terminated gracefully, but we are waiting results.
Here are some sample builds hitting this issue as well:
I haven't looked into it in much detail, but I suspect this is an issue with test2json: golang/go#38063
Missing newlines cause problems. I'm happy to keep this issue open to track the problem, but I suspect this needs to be fixed in Go.
In general it seems like chatty tests which output a lot of stdout do not work well with test2json. I have been working on cleaning up some tests to buffer output, and only print them when the test fails (ex: hashicorp/consul#7948).
Noticed that some successful tests get marked as failures in our CI. I noticed that if the
--- PASS:
final line indicator is preceded by other log information, the test is marked as fail with -0.0 run_time.The issue happens somewhat rarely - 10 builds out of 105 builds in my sample.
A sample case is
TestScalingPolicies_GetPolicy
in https://circleci.com/gh/hashicorp/nomad/69658 . The raw json events fromgo test
is in https://69658-36653430-gh.circle-artifacts.com/0/tmp/test-reports/testjsonfile.json .In the above case note that
--- PASS:
line isn't the beginning of the line:The logs are output of a processes that is spawned from the test and directly writes to Stderr. My theory is that the process is killed before the new line is flushed and result into contaminating
go test
output. In all of my observations, the go test success indicator ended the line, I haven't noticed any case where the process final log output surrounded go test indicator. I've updated our project to ensure the process is terminated gracefully, but we are waiting results.Here are some sample builds hitting this issue as well:
The text was updated successfully, but these errors were encountered: