Set PARALLEL_TEST environment variable.#172
Conversation
|
Why not rely on TEST_ENV_NUMBER -> more generic -> if something needs multiple test envs it's something parallel -> use different command names |
|
I often set TEST_ENV_NUMBER to run different tests in different terminals manually. TEST_ENV_NUMBER is used to determine which test database to connect to. I personally can't rely on it to mean that the test is being run inside parallel_tests and I imagine I'm not the only one. |
|
You are the 1% :D
|
|
How do you runs specs? I'm getting a failure when I try. Am I not running them properly or is there a bug in HEAD? |
|
try rake ;) On Wed, Jan 2, 2013 at 10:37 AM, Joseph Shraibman
|
Try to set PARALLEL_TESTS to number of processes. Add specs.
|
Updated. Test results: [jshraibman@Joseph-Shraibmans-MacBook-Pro feature/env_var ~/work/parallel_tests]$ time rake Pending: Finished in 68.45 seconds real 1m9.833s |
There was a problem hiding this comment.
I'd say kill the comment and put it into the it
it "sets PARALLEL_TESTS to something so child processes know that parallel_tests is used"
…EL_TESTS can be set to it.
|
Updated. |
|
how about making it more meaningful, for example PARALLEL_TEST_GROUPS=4 ? On Wed, Jan 2, 2013 at 1:14 PM, Joseph Shraibman
|
|
I can do the change myself, just curious about your opinion / if you still need it |
|
Changing the name still fulfills the original purpose of having programs know they are being run inside parallel_tests. I would have made the change myself but I got caught up with other things. |
Set PARALLEL_TEST environment variable.
There was a problem hiding this comment.
how about groups.size instead of num_processes, since that's the real number of processes used (vs requested) ?
There was a problem hiding this comment.
I'll just do it myself, also fits better with the env variable name :)
There was a problem hiding this comment.
I didn't realize there was a difference or I would have used groups.size.
There was a problem hiding this comment.
99% the same, just in weird edge-cases...
On Thu, Jan 3, 2013 at 8:44 PM, Joseph Shraibman
[email protected]:
In lib/parallel_tests/cli.rb:
@@ -28,7 +28,7 @@ def self.run_tests_in_parallel(num_processes, options)
report_number_of_tests runner, groupstest_results = Parallel.map(groups, :in_processes => groups.size) do |group|
run_tests(runner, group, groups.index(group), options)run_tests(runner, group, groups.index(group), num_processes, options)I didn't realize there was a difference or I would have used groups.size.
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/172/files#r2547499.
|
-> 0.9.2, thanks for the pull :) |
This will allow me to fix SimpleCov issue 64
Setting this environment variable will let tools know they are being run inside parallel_tests and adjust accordingly.