-
Notifications
You must be signed in to change notification settings - Fork 54
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
openshift log output on exception #492
base: master
Are you sure you want to change the base?
Conversation
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderHandler.java
Outdated
Show resolved
Hide resolved
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderHandler.java
Outdated
Show resolved
Hide resolved
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderHandler.java
Outdated
Show resolved
Hide resolved
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderHandler.java
Outdated
Show resolved
Hide resolved
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderHandler.java
Outdated
Show resolved
Hide resolved
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderHandler.java
Outdated
Show resolved
Hide resolved
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderHandler.java
Outdated
Show resolved
Hide resolved
junit5/src/main/java/cz/xtf/junit5/extensions/helpers/PodLogItem.java
Outdated
Show resolved
Hide resolved
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderService.java
Outdated
Show resolved
Hide resolved
cbedec8
to
e72e801
Compare
Have you considered Service Log Stream [1] for implementing this feature? Logic would be different to current implementation. Stream to some temporary place (e.g. into String) and once test failes flush that String to System.err.
[1] https://github.com/xtf-cz/xtf/blob/master/README.md?plain=1#L160 |
i think having having all logs is not as important as i'm already filtering only for warning/error messages and pod causing exception should be active at that time so we should have all important info. WDYT @istraka |
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderService.java
Outdated
Show resolved
Hide resolved
junit5/src/main/java/cz/xtf/junit5/extensions/OpenShiftRecorderHandler.java
Outdated
Show resolved
Hide resolved
I think there is problem when 2 test in single test case fail as in: Only the first one has attached logs in JUnit report but not the second one: |
savePodLogs(context, getFilter(context, POD_FILTER_MASTER), | ||
!isMasterAndBuildNamespaceSame() ? getFilter(context, POD_FILTER_BUILDS) : null, ps); | ||
saveBuildLogs(context, getFilter(context, BUILD_FILTER_MASTER), | ||
!isMasterAndBuildNamespaceSame() ? getFilter(context, BUILD_FILTER_MASTER) : null, ps); |
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.
please be aware of the same problem fixed in #521
issue: issue
Adding optional Openshift pod/build and event logs into test failure message.
Please make sure your PR meets the following requirements: