diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2015-08-09 21:26:14 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2015-08-09 21:26:18 +0900 |
commit | 1722044a27839f349da3e33ec6355ae67dc88fd8 (patch) | |
tree | 8804f632c0ed0d06611177097417778793d4d3b5 /test | |
parent | e95cd1d398030acf0ee18a4cc4913d9c4aaedbbb (diff) | |
download | plum-1722044a27839f349da3e33ec6355ae67dc88fd8.tar.gz |
flow_control: cframe_sizwe_error must be raised when received WINDOW_UPDATE with non-4 bytes payload
Diffstat (limited to 'test')
-rw-r--r-- | test/plum/test_flow_control.rb | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/test/plum/test_flow_control.rb b/test/plum/test_flow_control.rb index f5d9a1b..5e299e0 100644 --- a/test/plum/test_flow_control.rb +++ b/test/plum/test_flow_control.rb @@ -31,14 +31,21 @@ class FlowControlTest < Minitest::Test def test_flow_control_window_update_zero open_new_stream {|stream| - con = stream.connection - # stream error - con << Frame.new(type: :window_update, - stream_id: stream.id, - payload: "".push_uint32(0)).assemble - last = sent_frames.last - assert_equal(:rst_stream, last.type) - assert_equal(ERROR_CODES[:protocol_error], last.payload.uint32) + assert_stream_error(:protocol_error) { + stream.receive_frame Frame.new(type: :window_update, + stream_id: stream.id, + payload: "".push_uint32(0)) + } + } + end + + def test_flow_control_window_update_frame_size + open_new_stream {|stream| + assert_connection_error(:frame_size_error) { + stream.receive_frame Frame.new(type: :window_update, + stream_id: stream.id, + payload: "".push_uint16(0)) + } } end |