Changeset 632
- Timestamp:
- 01/02/08 10:45:20 (11 months ago)
- Files:
-
- version_0/tests/test_hc.rb (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
version_0/tests/test_hc.rb
r330 r632 27 27 $:.unshift "../lib" 28 28 require 'eventmachine' 29 require 'socket' 30 31 # This doesn't completely work under Ruby 1.9. 32 # Part of it is thread race conditions. I added some sleeps to make these 33 # tests work. Native threads do strange things when you do I/O on them. 34 # 35 29 36 30 37 class TestHeaderAndContentProtocol < Test::Unit::TestCase … … 67 74 ].join 68 75 t.close 76 if RUBY_VERSION =~ /\A1\.9\./ 77 sleep 0.1 78 STDERR.puts "Introducing extraneous sleep for Ruby 1.9" 79 end 69 80 }, proc { 70 81 EventMachine.stop … … 92 103 t.write content 93 104 t.close 94 }, proc { 95 EventMachine.stop 105 if RUBY_VERSION =~ /\A1\.9\./ 106 sleep 0.1 107 STDERR.puts "Introducing extraneous sleep for Ruby 1.9" 108 end 109 }, proc { 110 EM.stop 96 111 } 97 112 } … … 119 134 } 120 135 t.close 136 if RUBY_VERSION =~ /\A1\.9\./ 137 sleep 0.1 138 STDERR.puts "Introducing extraneous sleep for Ruby 1.9" 139 end 121 140 }, proc { 122 141 EventMachine.stop … … 174 193 t.write content 175 194 t.close 195 if RUBY_VERSION =~ /\A1\.9\./ 196 sleep 0.1 197 STDERR.puts "Introducing extraneous sleep for Ruby 1.9" 198 end 176 199 }, proc { 177 200 EventMachine.stop