Changeset 402
- Timestamp:
- 07/10/07 09:49:06 (2 years ago)
- Files:
-
- version_0/tests/test_ltp.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
version_0/tests/test_ltp.rb
r330 r402 100 100 def receive_line line 101 101 if line =~ /content-length:\s*(\d+)/i 102 @content_len th = $1.to_i102 @content_length = $1.to_i 103 103 elsif line.length == 0 104 104 set_binary_mode @content_length … … 120 120 conn.instance_eval "@lines = lines_received; @text = text_received" 121 121 end 122 EventMachine.add_timer( 4) {raise "test timed out"}122 EventMachine.add_timer(2) {raise "test timed out"} 123 123 EventMachine.defer proc { 124 124 t = TCPSocket.new TestHost, TestPort 125 125 t.puts "Content-length: 400" 126 126 t.puts 127 t.write "A" * 400128 127 output = t.read 129 128 t.close … … 178 177 179 178 #-------------------------------------------------------------------- 180 181 179 end 182 180