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

Setting up parallelisation on environment other than 'test' #970

Open
zhirgis opened this issue Sep 6, 2024 · 2 comments
Open

Setting up parallelisation on environment other than 'test' #970

zhirgis opened this issue Sep 6, 2024 · 2 comments

Comments

@zhirgis
Copy link

zhirgis commented Sep 6, 2024

So I'm working on a project that has both unit tests and so called E2E tests in same repository. For these two purposes we're using different environments 'test' for unit and 'e2e_test' for e2e tests. I was trying to parallelize e2e_tests, I have database.yml setup for the environment, and was trying to run rake tasks with specified environment "RAILS_ENV=e2e_test bundle exec rake parallel:prepare" however it seems like it still always runs on 'test' environment.
As I understand, env is always selected here: https://github.com/grosser/parallel_tests/blob/master/lib/parallel_tests/tasks.rb#L9

Is there a way to override the environment and work on a different one than 'test'?

@grosser
Copy link
Owner

grosser commented Sep 6, 2024

you can try running prepare in parallel like this
or run drop+create in parallel, but then you don't get the fixtures

if rails "prepare" itself does not hardcode the rails-env then we could remove the hardcoding here too, but I think it does

@zhirgis
Copy link
Author

zhirgis commented Sep 23, 2024

Sorry it took so long to get back, but yeah, I was not able to achieve this. As can see in the commit of the line, environment is always forced as 'test' 135673d

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