Skip to content

Commit

Permalink
add data + reply test
Browse files Browse the repository at this point in the history
  • Loading branch information
mojombo committed Nov 5, 2009
1 parent 5d63c60 commit fe01c37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/configs/simple.rb
Expand Up @@ -13,6 +13,8 @@
{ :noop => true }
elsif data == 'e' * 2048 + 'f'
{ :remote => "localhost:9980" }
elsif data == 'g'
{ :remote => "localhost:9980", :data => 'g2', :reply => 'g3-' }
else
{ :close => true }
end
Expand Down
4 changes: 4 additions & 0 deletions test/proxymachine_test.rb
Expand Up @@ -28,6 +28,10 @@ class ProxymachineTest < Test::Unit::TestCase
assert_proxy('localhost', 9990, 'd', 'ddd')
end

should "handle data plus reply" do
assert_proxy('localhost', 9990, 'g', 'g3-9980:g2')
end

should "handle noop" do
sock = TCPSocket.new('localhost', 9990)
sock.write('e' * 2048)
Expand Down

0 comments on commit fe01c37

Please sign in to comment.