Skip to content

Commit

Permalink
cleanup the test draft
Browse files Browse the repository at this point in the history
  • Loading branch information
StanChe committed Dec 22, 2023
1 parent d41f908 commit 11fe076
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions grpc/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,40 +129,4 @@ mod tests {
Err(status) => assert_eq!(status.code(), tonic::Code::InvalidArgument),
}
}

// #[tokio::test]
// async fn test_get_assets_updated_within_with_assets() {
// let mut mock = MockAssetDetailsStreamer::new();

// // Expect the method to be called and return a stream with asset details
// mock.expect_get_asset_details_stream_in_range()
// .with(eq(0), eq(10))
// .times(1)
// .returning(|_start_slot, _end_slot| {
// let (tx, rx) = tokio::sync::mpsc::channel(10);

// // Simulate sending some asset details
// tokio::spawn(async move {
// let asset_details = CompleteAssetDetails { /* ... */ };
// let _ = tx.send(Ok(asset_details)).await;
// });

// Ok(Box::pin(ReceiverStream::new(rx)) as AssetDetailsStream)
// });

// let service = PeerGapFillerServiceImpl {
// asset_details_streamer: Arc::new(mock),
// };

// let response = service
// .get_assets_updated_within(Request::new(RangeRequest {
// start_slot: 0,
// end_slot: 10,
// }))
// .await
// .unwrap();

// // Check that the stream contains items
// assert!(response.into_inner().next().await.is_some());
// }
}

0 comments on commit 11fe076

Please sign in to comment.