Skip to content
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

Pass task listener to JUnit parsing #18

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

timja
Copy link
Member

@timja timja commented Dec 21, 2021

Fixes #13

@timja timja added the bug label Dec 21, 2021
@timja timja merged commit 92a4ece into jenkinsci:master Dec 21, 2021
@timja timja deleted the pass-task-listener branch December 21, 2021 21:38
README.md Show resolved Hide resolved
@@ -42,13 +52,21 @@
private final String workspace;
private final boolean keepLongStdio;
private final String glob;
private final StepContext context;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just make sure this is not serialized to build.xml!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not appear to be:

    <org.jenkinsci.plugins.junitrealtimetestreporter.PipelineRealtimeTestResultAction plugin="junit-realtime-test-reporter@999999-SNAPSHOT">
      <descriptions class="concurrent-hash-map"/>
      <id>14</id>
      <node></node>
      <workspace>/Users/timja/code/jenkins/junit-realtime-test-reporter-plugin/work/workspace/junit-attachments-test_PR-8@2</workspace>
      <keepLongStdio>false</keepLongStdio>
      <glob>**/target/surefire-reports/TEST-*.xml</glob>
    </org.jenkinsci.plugins.junitrealtimetestreporter.PipelineRealtimeTestResultAction>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, but PipelineRealtimeTestResultAction is? Then this looks dangerous. Suggest making it transient and studying the conditions under which it might be saved.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, but PipelineRealtimeTestResultAction is? Then this looks dangerous. Suggest making it transient and studying the conditions under which it might be saved.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty results, the Junit plugin assumes it gets a non null task listener and it logs something when there's no results I think (although probably isn't annotating the methods as it's not really expected to have these methods called outside of the plugin).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Launcher is never used. The TaskListener you could perhaps replace with https://javadoc.jenkins.io/plugin/workflow-api/org/jenkinsci/plugins/workflow/flow/FlowExecutionOwner.html#getListener--; not ideal but it is only used in this corner case anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take a look tomorrow, how do I get to the FlowExecutionOwner?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkcast Run to FEO.Executable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE when surefire report directory is empty
2 participants