()
| 97 | |
| 98 | #[tokio::test] |
| 99 | pub async fn test_execute_ingest_error() { |
| 100 | let test_server = FlightSqlServiceImpl::new(); |
| 101 | let fixture = TestFixture::new(test_server.service()).await; |
| 102 | let channel = fixture.channel().await; |
| 103 | let mut flight_sql_client = FlightSqlServiceClient::new(channel); |
| 104 | let cmd = make_ingest_command(); |
| 105 | // send an error from the client |
| 106 | let batches = vec![ |
| 107 | Ok(make_primitive_batch(5)), |
| 108 | Err(FlightError::NotYetImplemented( |
| 109 | "Client error message".to_string(), |
| 110 | )), |
| 111 | ]; |
| 112 | // make sure the client returns the error from the client |
| 113 | let err = flight_sql_client |
| 114 | .execute_ingest(cmd, futures::stream::iter(batches)) |
| 115 | .await |
| 116 | .unwrap_err(); |
| 117 | assert_eq!( |
| 118 | err.to_string(), |
| 119 | "External error: Not yet implemented: Client error message" |
| 120 | ); |
| 121 | } |
| 122 | |
| 123 | #[tokio::test] |
| 124 | pub async fn test_do_put_empty_stream() { |
nothing calls this directly
no test coverage detected