No 'Failed tests detected' section in logs
Hello,
I'm using Teamcity 2019.1.3 and I noticed that on some agents in gradle build logs there are no sections:
[08:41:52]F: [...] java.lang.NullPointerException
[08:41:53]E: [Step 3/5] Failed tests detected
Lack of 'Failed tests detected' section leads to a problem that I get on Teamcity web:
Execution failed for task ':[task-name]test'. org.gradle.internal.event.ListenerNotificationException: Failed to notify test listener.
I also noticed that [08:41:52]F: and 8:41:53]E: look like some markers for logs parsing. F: seems to mark failed test and it's missing on same agents.
I checked and I did not found any differences between agents' configuration, libraries, plugins etc. Maybe I missed something. Does anybody know what is responsible for adding those F: lines?
Thank you for any help,
meront
Please sign in to leave a comment.
Hi Meront,
sorry for the delay, did you manage to find the root of the issue? The build runners report the line logs back to the server which stores them on a custom format for displaying. After displaying, the F/E markings, along many others, are written from the stored content.
The error message, you mentioned that you get it on "TeamCity web", but it seems to be a log from gradle running. TeamCity, to get live information from the tests, injects listeners to be able to provide test information. If the test listener cannot be injected (as the error notifies), then the tests cannot be properly reported.
So the issue would seem to be that teamcity cannot inject a test listener into the build (leading to the error message), then those tests cannot be reported back properly and lead to a seemingly malformed build log.