|
1 | | -#![cfg(feature = "async-channel-transport")] |
| 1 | +#![cfg(feature = "tokio-mpsc-transport")] |
2 | 2 | #![allow(non_local_definitions)] |
3 | 3 | mod math; |
4 | 4 | use math::*; |
5 | 5 | use quic_rpc::{ |
6 | 6 | server::{RpcChannel, RpcServerError}, |
7 | | - transport::async_channel, |
| 7 | + transport::tokio_mpsc, |
8 | 8 | RpcClient, RpcServer, Service, |
9 | 9 | }; |
10 | 10 |
|
11 | 11 | #[tokio::test] |
12 | 12 | async fn async_channel_channel_bench() -> anyhow::Result<()> { |
13 | 13 | tracing_subscriber::fmt::try_init().ok(); |
14 | | - let (server, client) = async_channel::connection::<ComputeService>(1); |
| 14 | + let (server, client) = tokio_mpsc::connection::<ComputeService>(1); |
15 | 15 |
|
16 | 16 | let server = RpcServer::<ComputeService, _>::new(server); |
17 | 17 | let server_handle = tokio::task::spawn(ComputeService::server(server)); |
@@ -60,7 +60,7 @@ async fn async_channel_channel_mapped_bench() -> anyhow::Result<()> { |
60 | 60 | type Req = InnerRequest; |
61 | 61 | type Res = InnerResponse; |
62 | 62 | } |
63 | | - let (server, client) = async_channel::connection::<OuterService>(1); |
| 63 | + let (server, client) = tokio_mpsc::connection::<OuterService>(1); |
64 | 64 |
|
65 | 65 | let server = RpcServer::new(server); |
66 | 66 | let server_handle: tokio::task::JoinHandle<Result<(), RpcServerError<_>>> = |
@@ -96,9 +96,9 @@ async fn async_channel_channel_mapped_bench() -> anyhow::Result<()> { |
96 | 96 |
|
97 | 97 | /// simple happy path test for all 4 patterns |
98 | 98 | #[tokio::test] |
99 | | -async fn async_channel_channel_smoke() -> anyhow::Result<()> { |
| 99 | +async fn tokio_mpsc_channel_smoke() -> anyhow::Result<()> { |
100 | 100 | tracing_subscriber::fmt::try_init().ok(); |
101 | | - let (server, client) = async_channel::connection::<ComputeService>(1); |
| 101 | + let (server, client) = tokio_mpsc::connection::<ComputeService>(1); |
102 | 102 |
|
103 | 103 | let server = RpcServer::<ComputeService, _>::new(server); |
104 | 104 | let server_handle = tokio::task::spawn(ComputeService::server(server)); |
|
0 commit comments