feat: scaffold streaming e2e fixtures

This commit is contained in:
a.tolmachev
2026-04-06 12:12:21 +03:00
parent b40daf4f54
commit 4953272bcf
5 changed files with 233 additions and 1 deletions
@@ -0,0 +1,22 @@
use crank_adapter_grpc::test_support::{EchoServiceImpl, echo};
use tokio::net::TcpListener;
use tonic::transport::Server;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let bind = std::env::var("CRANK_E2E_GRPC_FIXTURE_BIND")
.unwrap_or_else(|_| "127.0.0.1:3311".to_owned());
let listener = TcpListener::bind(&bind).await?;
let incoming = tonic::transport::server::TcpIncoming::from(listener);
println!("gRPC stream fixture listening on http://{bind}");
Server::builder()
.add_service(echo::echo_service_server::EchoServiceServer::new(
EchoServiceImpl,
))
.serve_with_incoming(incoming)
.await?;
Ok(())
}