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
Add option to use TEST_ENV_NUMBER="1" for first process #477
Add option to use TEST_ENV_NUMBER="1" for first process #477
Conversation
See README changes and discussion on #297 for motivation. The implementation allows for switching via either an environment variable or a command-line switch for the `parallel_test` executable, similar to `PARALLEL_TEST_PROCESSORS` and `-n`.
@@ -24,6 +24,11 @@ def determine_number_of_processes(count) | |||
].detect{|c| not c.to_s.strip.empty? }.to_i | |||
end | |||
|
|||
def always_use_test_env_number_for_first_process? | |||
val = ENV["PARALLEL_TEST_USE_TEST_ENV_NUMBER_FOR_FIRST_PROCESS"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PARALLEL_TEST_FIRST_IS_1
? :)
test coverage looks good! |
(and related)
Make it private in CLI per review.
Per review.
Updated per discussion. Thanks for your feedback. I tried to repro the travis failures, but they don't happen for me locally. Are they expected? |
Looks like those tests didn't fail the second time around, so nothing to worry about 😃. Please let me know if you have any other feedback. |
Add option to use TEST_ENV_NUMBER="1" for first process
Thanks! |
v2.3.0 is out! |
Awesome. Thanks a lot. |
See README changes and discussion on #297 for motivation.
The implementation allows for switching via either an environment variable or a command-line switch for the
parallel_test
executable, similar toPARALLEL_TEST_PROCESSORS
and-n
.The env var is
PARALLEL_TEST_USE_TEST_ENV_NUMBER_FOR_FIRST_PROCESS
and the command line option is--use-test-env-number-for-first-process
. I'm happy to change these to something less verbose.