-
Notifications
You must be signed in to change notification settings - Fork 67
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
feature request: parallel execution #168
Comments
If anyone else is interested (or the maintainers of this library), I managed to achieve parallel execution for this library, with the following ObjectFactory. The basic idea, is that instead of a single Guice context, it starts a new context for every thread that is started by surefire.
I understand that this solution might be a bit somewhat memory consuming, but for my use case it's not a problem. Thankfully, Guice is very light. The alternative of having a single Guice context for all threads, and making all singletons inside the cukes-rest library thread-isolated is a huge amount of work and I wouldn't recommend it. |
(thanks for the recent upgrade to cucumber 6 🥳)
Are there any ongoing efforts for supporting parallel execution?
After some failed attempts, it seems that it fails on the 2 following points (depending on the timing of the threads):
io.cucumber.guice.SequentialScenarioScope
enter/exit methods throw IllegalStateExceptionhttps://stackoverflow.com/questions/44166354/cucumber-guice-injector-seems-not-to-be-thread-safe-parallel-execution-exec
RestAssured -> Apache HttpClient -> BasicClientConnManager. Maybe replace with
PoolingHttpClientConnectionManager
? I think that one is thread-safe.Not sure if there are other issues related to cukes-rest specifically, like how some variables are used (e.g.
world
).Probably there needs to be some more thread-isolation changes :/
The text was updated successfully, but these errors were encountered: