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

Listeners are not called - Only called if forkCount=0 #2909

Closed
xescuder opened this issue Aug 31, 2022 · 5 comments
Closed

Listeners are not called - Only called if forkCount=0 #2909

xescuder opened this issue Aug 31, 2022 · 5 comments

Comments

@xescuder
Copy link

If I execute mvn verify of my project (based on last release and pom.xml of Cucumber Starter), none of my custom listeners are called.

But if I execute:
mvn verify -DforkCount=0 then my custom listeners are called.

@wakaleo
Copy link
Member

wakaleo commented Aug 31, 2022

Check the code how the listeners are read and cached - there might be some thread-local stuff going on.

@xescuder
Copy link
Author

It worked in previous versions of Serenity. Which part of the code should I check?

@xescuder
Copy link
Author

I've also tried with the SampleStepListener, not working

@wakaleo
Copy link
Member

wakaleo commented Aug 31, 2022

You'll need to look in the code to see how those clases are being loaded. I don't have the code in front of me but just search for usages of the interface.

@xescuder
Copy link
Author

xescuder commented Sep 13, 2022

Hi, @wakaleo. I think we've found a solution. If we add useModulePath false to failsafe plugin it works.

<plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>3.0.0-M5</version> <configuration> <useModulePath>false</useModulePath>

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

No branches or pull requests

2 participants