Fixed stack overflow when runners produce a lot of non-Hydra console output.

This commit is contained in:
Arturo 2011-04-26 11:08:15 -04:00
parent a9a0845b19
commit 78ae8eace6
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#!/usr/bin/env ruby
10000.times do
$stdout.write "A non-hydra message...\n"
$stdout.flush
end
$stdout.write "{:class=>Hydra::Messages::TestMessage, :text=>\"My message\"}\n"
$stdout.flush

View File

@ -11,4 +11,15 @@ class SSHTest < Test::Unit::TestCase
assert_equal "Hello World", response.text assert_equal "Hello World", response.text
ssh.close ssh.close
end end
should "be able to handle a large number of non-Hydra console output" do
ssh = Hydra::SSH.new(
'localhost', # connect to this machine
File.expand_path(File.join(File.dirname(__FILE__))), # move to the test directory
"ruby fixtures/many_outputs_to_console.rb"
)
response = ssh.gets
assert_equal "My message", response.text
ssh.close
end
end end