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

Add option to use TEST_ENV_NUMBER="1" for first process #477

Merged
merged 5 commits into from Jan 21, 2016
Merged

Add option to use TEST_ENV_NUMBER="1" for first process #477

merged 5 commits into from Jan 21, 2016

Conversation

rsutphin
Copy link
Contributor

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.

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.

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"]
Copy link
Owner

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 ? :)

@grosser
Copy link
Owner

grosser commented Jan 19, 2016

test coverage looks good!

@rsutphin
Copy link
Contributor Author

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?

@rsutphin
Copy link
Contributor Author

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.

grosser added a commit that referenced this pull request Jan 21, 2016
Add option to use TEST_ENV_NUMBER="1" for first process
@grosser grosser merged commit f5f6a1f into grosser:master Jan 21, 2016
@rsutphin
Copy link
Contributor Author

Thanks!

@grosser
Copy link
Owner

grosser commented Jan 21, 2016

v2.3.0 is out!

@rsutphin
Copy link
Contributor Author

Awesome. Thanks a lot.

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

Successfully merging this pull request may close these issues.

None yet

2 participants