fn priority_update_request_multiple_stream_arm_single_flight() {
        let mut s = Session::default().unwrap();
        s.handshake().unwrap();

        let mut d = [42; 65535];

        let mut b = octets::OctetsMut::with_slice(&mut d);

        let p1 = frame::Frame::PriorityUpdateRequest {
            prioritized_element_id: 0,
            priority_field_value: b"u=3".to_vec(),
        };

        let p2 = frame::Frame::PriorityUpdateRequest {
            prioritized_element_id: 4,
            priority_field_value: b"u=3".to_vec(),
        };

        let p3 = frame::Frame::PriorityUpdateRequest {
            prioritized_element_id: 8,
            priority_field_value: b"u=3".to_vec(),
        };

        p1.to_bytes(&mut b).unwrap();
        p2.to_bytes(&mut b).unwrap();
        p3.to_bytes(&mut b).unwrap();

        let off = b.off();
        s.pipe
            .client
            .stream_send(s.client.control_stream_id.unwrap(), &d[..off], false)
            .unwrap();

        s.advance().ok();

        assert_eq!(s.poll_server(), Ok((0, Event::PriorityUpdate)));
        assert_eq!(s.poll_server(), Ok((4, Event::PriorityUpdate)));
        assert_eq!(s.poll_server(), Ok((8, Event::PriorityUpdate)));
        assert_eq!(s.poll_server(), Err(Error::Done));

        assert_eq!(s.server.take_last_priority_update(0), Ok(b"u=3".to_vec()));
        assert_eq!(s.server.take_last_priority_update(4), Ok(b"u=3".to_vec()));
        assert_eq!(s.server.take_last_priority_update(8), Ok(b"u=3".to_vec()));

        assert_eq!(s.server.take_last_priority_update(0), Err(Error::Done));
    }
/// Send multiple PRIORITY_UPDATE frames for different streams from the
/// client across a single flight.
Send multiple PRIORITY_UPDATE frames for different streams from the
client across a single flight.
Send multiple PRIORITY_UPDATE frames for different streams from the client across a single flight .
fn priority_update_request_multiple_stream_arm_single_flight() {
        let mut s = Session::default().unwrap();
        s.handshake().unwrap();
        let mut d = [42; 65535];
        let mut b = octets::OctetsMut::with_slice(&mut d);
        let p1 = frame::Frame::PriorityUpdateRequest {
            prioritized_element_id: 0,
            priority_field_value: b"u=3".to_vec(),
        };
        let p2 = frame::Frame::PriorityUpdateRequest {
            prioritized_element_id: 4,
            priority_field_value: b"u=3".to_vec(),
        };
        let p3 = frame::Frame::PriorityUpdateRequest {
            prioritized_element_id: 8,
            priority_field_value: b"u=3".to_vec(),
        };
        p1.to_bytes(&mut b).unwrap();
        p2.to_bytes(&mut b).unwrap();
        p3.to_bytes(&mut b).unwrap();
        let off = b.off();
        s.pipe
            .client
            .stream_send(s.client.control_stream_id.unwrap(), &d[..off], false)
            .unwrap();
        s.advance().ok();
        assert_eq!(s.poll_server(), Ok((0, Event::PriorityUpdate)));
        assert_eq!(s.poll_server(), Ok((4, Event::PriorityUpdate)));
        assert_eq!(s.poll_server(), Ok((8, Event::PriorityUpdate)));
        assert_eq!(s.poll_server(), Err(Error::Done));
        assert_eq!(s.server.take_last_priority_update(0), Ok(b"u=3".to_vec()));
        assert_eq!(s.server.take_last_priority_update(4), Ok(b"u=3".to_vec()));
        assert_eq!(s.server.take_last_priority_update(8), Ok(b"u=3".to_vec()));
        assert_eq!(s.server.take_last_priority_update(0), Err(Error::Done));
    }
fn priority_update_request_multiple_stream_arm_single_flight ( ) { let mut s = Session :: default ( ) . unwrap ( ) ; s . handshake ( ) . unwrap ( ) ; let mut d = [ 42 ; 65535 ] ; let mut b = octets :: OctetsMut :: with_slice ( & mut d ) ; let p1 = frame :: Frame :: PriorityUpdateRequest { prioritized_element_id : 0 , priority_field_value : b" " . to_vec ( ) , } ; let p2 = frame :: Frame :: PriorityUpdateRequest { prioritized_element_id : 4 , priority_field_value : b" " . to_vec ( ) , } ; let p3 = frame :: Frame :: PriorityUpdateRequest { prioritized_element_id : 8 , priority_field_value : b" " . to_vec ( ) , } ; p1 . to_bytes ( & mut b ) . unwrap ( ) ; p2 . to_bytes ( & mut b ) . unwrap ( ) ; p3 . to_bytes ( & mut b ) . unwrap ( ) ; let off = b . off ( ) ; s . pipe . client . stream_send ( s . client . control_stream_id . unwrap ( ) , & d [ .. off ] , false ) . unwrap ( ) ; s . advance ( ) . ok ( ) ; assert_eq ! ( s poll_server ( ) Ok ( ( 0 Event PriorityUpdate ) ) ) ; assert_eq ! ( s poll_server ( ) Ok ( ( 4 Event PriorityUpdate ) ) ) ; assert_eq ! ( s poll_server ( ) Ok ( ( 8 Event PriorityUpdate ) ) ) ; assert_eq ! ( s poll_server ( ) Err ( Error Done ) ) ; assert_eq ! ( s server take_last_priority_update ( 0 ) Ok ( b" " to_vec ( ) ) ) ; assert_eq ! ( s server take_last_priority_update ( 4 ) Ok ( b" " to_vec ( ) ) ) ; assert_eq ! ( s server take_last_priority_update ( 8 ) Ok ( b" " to_vec ( ) ) ) ; assert_eq ! ( s server take_last_priority_update ( 0 ) Err ( Error Done ) ) ; }
Send multiple PRIORITY_UPDATE frames for different streams from the
client across a single flight.
Send multiple PRIORITY_UPDATE frames for different streams from the client across a single flight .