Project

General

Profile

Backport #2609

threaded tests fail in 1.9.1 on OS X 10.5

Added by hramrach (Michal Suchanek) over 10 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
[ruby-core:27603]

Description

=begin
This is not 100% reliably reproducible but make test often fails.

OS X 10.5.8 9L30

#228 test_io.rb:11:in `':
begin
require "io/nonblock"
r, w = IO.pipe
w.nonblock = true
w.write_nonblock("a" * 100000)
w.nonblock = false
t1 = Thread.new { w.write("b" * 4096) }
t2 = Thread.new { w.write("c" * 4096) }
sleep 0.5
r.sysread(4096).length
sleep 0.5
r.sysread(4096).length
t1.join
t2.join
rescue LoadError
end
#=> not finished in 10 seconds [ruby-dev:32566]

another test failing less often - also thread related.

#921 test_thread.rb:191:in `':
begin
100.times do |i|
begin
Thread.start(Thread.current) {|u| u.raise }
raise
rescue
ensure
end
end
rescue
100
end
#=> "" (expected "100") [ruby-dev:31371]
FAIL 1/945 tests failed
=end

Also available in: Atom PDF