Ramdom test failure for test_pstore_files_are_accessed_as_binary_files
test_pstore_files_are_accessed_as_binary_files(PStoreTest) sometime fails on ci.rubyinstaller.org.
IOError: stream closed
read'block in invoke_ruby'
call'block in initialize'
This happens on both i386-mingw32 and x64-mingw32 test-all jobs:
This seems due to timeout(10 seconds) since the test is slow (usually over 5s) on Windows with HDD disk.
make test-all TESTS="-v test_pstore.rb"
PStoreTest#test_pstore_files_are_accessed_as_binary_files = 8.33 s = .
If other processes run in parallel, it would be possible to take time over 10s (timeout).
I confirmed same
IOError: stream closed was raised on my local box by setting shorter timeout.
The reason of
IOError: stream closed would be that the pipe is closed at ensure block in EnvUtil#invoke_ruby while a thread which reads from the pipe is alive.
If killing threads before closing pipe, Timeout::Error is shown.
It would be nice to know the cause of error easily if Timeout::Error was showen in the case of timeout.
And more longer timeout would be helpful not to fail this test for Windows.
I attached a patch. This increases timeout to 15s.
Luis Lavena also confirmed this patch helped when tested manually on the worker machine.
Updated by Anonymous over 7 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r36900.
Hiroshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
test_pstore.rb: fix for timeout
test/ruby/envutil.rb (EnvUtil#invoke_ruby): show Timeout::Error
instead of IOError if the timeout has expired.
increase timeout because this test is slow on Windows.
[ruby-core:47402] [Bug #6965]