Environment variable array count does not seem to limit amount of workers?
Thank you very much for making this project! I'm trying to get this to work with a Drupal site. I can't just execute it with max workers as there are a lot of collisions on features and then MySQL just goes away at some point and it all dies.
So, I am trying to now just test with 2 workers, and give each their own database. My behat.yml looks like so:
I also in settings.php for Drupal use the environment variable that is set above to give each thread it's own database:
Now, whenever I kick off Behat with parallel feature, I get the following output (starts with 8 workers)
What am I doing wrong here?
When you run behat --help. then You have listed command options
-l, --parallel[=PARALLEL] How many scenario jobs run in parallel? Available values empty or integer [default: false]
--parallel-feature[=PARALLEL-FEATURE] How many scenario jobs run in parallel feature mode? Available values empty or integer [default: false]
```
So, is the readme wrong then that the amount of workers you get is not relative to the count of the array in behat.yml?
If I use --parallel-feature[2] will each respective parallel worker get the environment variable?
And this is also described in README.md https://github.com/Daniel-Marynicz/BehatParallelExtension?tab=readme-ov-file#usage
Ah, I think I see the issue. You explain how to set the amount of workers after you explain how to limit the number in the readme.
Maybe put that info right at the top? Seems immediately pertinent.
Environment array only defines the number of workers you can run. But you must set the number of workers on the command line.
Interesting, so you can set the environment array to 2, but run the command and it'll run max even if only 2?
You need run with command
behat --parallel-feature=2
or
behat --parallel=2
Okay, so the readme is wrong when it says "From this environments array depends on how much maximum you can run Workers."
The readme probably needs a good workthrough. I can try and update it once I get this all working.
It is not wrong. The readme does not say that there will be as many threads depending on the number of keys in the array. It depends on what the user specifies in the command line.
You can update the readme and do a pull request.