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.
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.
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.