-
Notifications
You must be signed in to change notification settings - Fork 106
Add support for process based parallel test running #346
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 support for process based parallel test running #346
Conversation
GitHub: test-unitGH-235 Will be available process based parallel test running. A user can use it by the `--parallel=process` option. A user needs to specify load path options (e.g. `-Ilib`). Workers preload required files, so they must have the correct `$LOAD_PATH`. However, it's hard for us to figure out the right extra load paths automatically. Like the thread based runner, the test case level fixture defined tests run in the same worker. Co-authored-by: Sutou Kouhei <kou@clear-code.com> Co-authored-by: Naoto Ono <onoto1998@gmail.com>
| data = worker.receive | ||
| case data[:status] | ||
| when :ready | ||
| test_name = run_context.test_names.shift |
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.
Like the Thread::Queue#pop, We can use Array#shift instead of Array#pop.
|
3.4 on Windows + Process CI has failed:
On Windows, can we pass file descriptors 3 and above to child processes? |
Oh... I don't want to change stdin/stdout/stderr as much as possible because tests may use them. We may need to find another approach... |
`Test::Unit::TestSuite::FINISHED::OBJECT` event includes `Test::Unit::TestCase` object, and `Test::Unit::TestCase` object has `Test::Unit::ProcessTestResult` object. `Test::Unit::ProcessTestResult` object has `IO` object, so it can't dump. Since f0ddbe7, `Test::Unit::TestCase` object dump only minimal data, so this object has not `Test::Unit::ProcessTestResult` object.
Ouch! This means do we use
|
kou
left a comment
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.
This means do we use
TCP/IP socketinstead ofIO.pipeas below?
Let's try it.
Let's work on Windows support as a separated task.
GitHub: test-unitGH-235, test-unitGH-346 On Windows, file descriptors 3 and above cannot be passed to child processes. So we use `TCPSocket` instead of `IO.pipe`.
GitHub: test-unitGH-235, test-unitGH-346 On Windows, file descriptors 3 and above cannot be passed to child processes. So we use `TCPSocket` instead of `IO.pipe`.
GitHub: GH-235
Will be available process based parallel test running. A user can use it by the
--parallel=processoption.A user needs to specify load path options (e.g.
-Ilib). Workers preload required files, so they must have the correct$LOAD_PATH. However, it's hard for us to figure out the right extra load paths automatically.Like the thread based runner, the test case level fixture defined tests run in the same worker.
Note: Windows is not supported yet.