Hi Circle team. Recently I’ve noticed that despite having a JUnit test failure, my build is still marked as successful. This seems like a regression from past behavior where any test breaks would mark the build as broken.
find exits with status 0 if all files are processed successfully, greater than 0 if errors occur. This is deliberately a very broad description, but if the return value is non-zero, you should not rely on the correctness of the results of find.
In my case, I was piping test output to the tee command - and tee was always returning a 0 exit code! Major facepalm.
I’ve since stopped using tee and instead redirect all test class output to individual files using maven-surefire-plugin's redirectTestOutputToFile setting. This keeps the console output nice and brief, but I can still research stdout in the event of a break, and CI correctly reports failures.