// TODO: test fails with an assertion error, we never see a response from the client.
// fails with 'expected a response: Other("partial frame")'
test fails with an assertion error, we never see a response from the client.
fails with 'expected a response: Other("partial frame")'
test fails with an assertion error we never see a response from the client . fails with ' expected a response : Other ( " partial frame " ) '
fn server_streaming(client: TestServiceClient) {
    let mut req = StreamingOutputCallRequest::new();
    let mut params = Vec::new();
    for &size in [31415, 9, 2653, 58979].iter() {
        let mut rp = ResponseParameters::new();
        rp.set_size(size as i32);
        params.push(rp);
    }
    req.set_response_parameters(::protobuf::RepeatedField::from_vec(params));
    let response_stream = client.streaming_output_call(grpc::RequestOptions::new(), req).wait_drop_metadata();
    let mut response_sizes = Vec::new();
    {
        // this scope is to satisfy the borrow checker.
        let bar = response_stream.map(|response| {
            response_sizes.push(response.expect("expected a response").get_payload().body.len());
        });
        assert!(bar.count() == 4);
    }
    assert!(response_sizes.len() == 4);
    assert!(response_sizes[0] == 31415);
    assert!(response_sizes[1] == 9);
    assert!(response_sizes[2] == 2653);
    assert!(response_sizes[3] == 58979);
    println!("{} ServerStreaming done", Local::now().to_rfc3339());
}
fn server_streaming ( client : TestServiceClient ) { let mut req = StreamingOutputCallRequest :: new ( ) ; let mut params = Vec :: new ( ) ; for & size in [ 31415 , 9 , 2653 , 58979 ] . iter ( ) { let mut rp = ResponseParameters :: new ( ) ; rp . set_size ( size as i32 ) ; params . push ( rp ) ; } req . set_response_parameters ( :: protobuf :: RepeatedField :: from_vec ( params ) ) ; let response_stream = client . streaming_output_call ( grpc :: RequestOptions :: new ( ) , req ) . wait_drop_metadata ( ) ; let mut response_sizes = Vec :: new ( ) ; { // this scope is to satisfy the borrow checker. let bar = response_stream . map ( | response | { response_sizes . push ( response . expect ( " " ) . get_payload ( ) . body . len ( ) ) ; } ) ; assert ! ( bar count ( ) 4 ) ; } assert ! ( response_sizes len ( ) 4 ) ; assert ! ( response_sizes [ 0 ] 31415 ) ; assert ! ( response_sizes [ 1 ] 9 ) ; assert ! ( response_sizes [ 2 ] 2653 ) ; assert ! ( response_sizes [ 3 ] 58979 ) ; println ! ( " " Local now ( ) to_rfc3339 ( ) ) ; }
TODO: test fails with an assertion error, we never see a response from the client.
TODO : test fails with an assertion error we never see a response from the client .
client
TestServiceClient