diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-12-03 17:05:07 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-12-03 17:26:12 +0900 |
commit | 409e4ab740de3852c3667217bcf41b55040f638f (patch) | |
tree | a4dcbe97fcd44c4c109297eba071313d6b072ee0 /tool/test/testunit | |
parent | e42d9d8df87f58b9bfa65647249822df25851375 (diff) | |
download | ruby-409e4ab740de3852c3667217bcf41b55040f638f.tar.gz |
tool/lib/test/unit/parallel.rb: fail explicitly when failing to get io
`(ulimit -n 30; make test-tool)` fails with unexplicit message:
"undefined method `write' for nil:NilClass" due to lack of stdout.
This change makes it explicit. [Bug #5577]
Diffstat (limited to 'tool/test/testunit')
-rw-r--r-- | tool/test/testunit/test_parallel.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tool/test/testunit/test_parallel.rb b/tool/test/testunit/test_parallel.rb index 24e1f89bcb..60fc2073dd 100644 --- a/tool/test/testunit/test_parallel.rb +++ b/tool/test/testunit/test_parallel.rb @@ -98,6 +98,7 @@ module TestParallel while buf = @worker_out.gets break if /^p (.+?)$/ =~ buf end + assert_not_nil($1, "'p' was not found") assert_match(/TestA#test_nothing_test = \d+\.\d+ s = \.\n/, $1.chomp.unpack("m")[0]) end end @@ -108,6 +109,7 @@ module TestParallel while buf = @worker_out.gets break if /^done (.+?)$/ =~ buf end + assert_not_nil($1, "'done' was not found") result = Marshal.load($1.chomp.unpack("m")[0]) assert_equal(5, result[0]) |