On Wed, Apr 17, 2019 at 10:47 AM Daniel Anechitoaie
<daniels0...@gmail.com> wrote:
> So I think the problem might be with serialization and they way I try to 
> capture data in TaskListenerDecorator

Probably. You should not be attempting to serialize a `StepExecution`
there; it can only be saved in `program.dat`, whereas
`TaskListenerDecorator` is sent to agent JVMs under some conditions
(including your own `XMLLinterStepCallable`). Anyway your code could
not possibly work as written since the `addBodyOutputLine` call would
be made on a _copy_ of the original object, not the one actually used
in the callback. If this output is important, you would need to
explicitly stream it back to the master somehow, as in

https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/5d48ed444cd4041d4b00a2c7197559406d1a2c9a/src/main/java/org/jenkinsci/plugins/workflow/steps/TimeoutStepExecution.java#L255-L336

(You must be very defensive when writing a `SlaveToMasterCallable`, so
this is not for the faint-hearted, but it seems you have already
gotten into some pretty advanced usage.)


There may be some error being printed that you are not seeing
currently—make sure you use the newest parent POM, and call the new
API in

https://github.com/jenkinsci/jenkins-test-harness/pull/127

from your tests.


BTW pending availability of

https://github.com/jenkinsci/jenkins/pull/3959

in your `jenkins.version`, you must override `flush` and `close` as
shown there. Also `XMLLinterStepCallable.invoke` should `flush` before
exiting.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3m6S_QVd2_M1bB7o7nwg%3DLGLVAsxxgWMm_mR2kXnOT5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to