diff options
| author | Jamis Buck <jamis@37signals.com> | 2009-01-31 22:08:47 -0700 |
|---|---|---|
| committer | Jamis Buck <jamis@37signals.com> | 2009-01-31 22:08:47 -0700 |
| commit | f09d124a2b4cbf6e03549f1bb32cace57601738c (patch) | |
| tree | c427edfcc97c3f37df100a0019a75a169b83c52a /test | |
| parent | 07ba76a53e659414d9b9dae17bce8e16d394f333 (diff) | |
| download | net-ssh-f09d124a2b4cbf6e03549f1bb32cace57601738c.tar.gz | |
Ignore requests for non-existent channels
This works around a bug in some ssh servers, where channel requests
are sent to channels after the channels have been closed.
Diffstat (limited to 'test')
| -rw-r--r-- | test/connection/test_session.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/connection/test_session.rb b/test/connection/test_session.rb index ba9c34f..05c3ad8 100644 --- a/test/connection/test_session.rb +++ b/test/connection/test_session.rb @@ -257,6 +257,11 @@ module Connection process_times(2) end + def test_channel_request_for_nonexistant_channel_should_be_ignored + transport.return(CHANNEL_REQUEST, :long, 14, :string, "testing", :bool, false) + assert_nothing_raised { process_times(2) } + end + def test_channel_request_packet_should_be_routed_to_corresponding_channel channel_at(14).expects(:do_request).with("testing", false, Net::SSH::Buffer.new) transport.return(CHANNEL_REQUEST, :long, 14, :string, "testing", :bool, false) @@ -480,4 +485,4 @@ module Connection end end -end
\ No newline at end of file +end |
