diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6525c95..18f6559 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,12 +79,6 @@ jobs: cargo test --no-default-features --features "test,encryption,net,metrics,${{ matrix.runtime }}" -- --test-threads=1 working-directory: ruserf - - - name: Run Unit Tests for ruserf based on quinn transport - run: | - cargo test --no-default-features --features "test,compression,quinn,metrics,${{ matrix.runtime }}" -- --test-threads=1 - working-directory: ruserf - - name: Cache Cargo registry uses: actions/cache@v3 with: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a0b57fe..005d398 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -40,9 +40,6 @@ jobs: - crate: ruserf features: "test,tokio,tcp,encryption,metrics" name: "ruserf-tcp-encryption" - - crate: ruserf - features: "test,tokio,quinn,compression,metrics" - name: "ruserf-quinn-compression" steps: - uses: actions/checkout@v3 - name: Install latest nightly diff --git a/core/src/serf/base/tests/serf.rs b/core/src/serf/base/tests/serf.rs index 73ef40b..2099bac 100644 --- a/core/src/serf/base/tests/serf.rs +++ b/core/src/serf/base/tests/serf.rs @@ -570,7 +570,10 @@ pub async fn serf_coordinates( } if start.elapsed() > Duration::from_secs(7) { - panic!("timed out cond1 {} cond2 {} cond3 {} cond4 {}", cond1, cond2, cond3, cond4); + panic!( + "timed out cond1 {} cond2 {} cond3 {} cond4 {}", + cond1, cond2, cond3, cond4 + ); } } diff --git a/ruserf/test/main.rs b/ruserf/test/main.rs index 7f45b69..ee2a4da 100644 --- a/ruserf/test/main.rs +++ b/ruserf/test/main.rs @@ -5,10 +5,6 @@ use ruserf_core::tests::run as run_unit_test; #[path = "./main/net.rs"] mod net; -#[cfg(feature = "quic")] -#[path = "./main/quic.rs"] -mod quic; - #[cfg(feature = "tokio")] fn tokio_run(fut: impl Future) { let runtime = ::tokio::runtime::Builder::new_multi_thread() diff --git a/ruserf/test/main/TODO.md b/ruserf/test/main/TODO.md deleted file mode 100644 index 4eb7ad7..0000000 --- a/ruserf/test/main/TODO.md +++ /dev/null @@ -1,10 +0,0 @@ -# FIX - -- quinn - (All failed test cases failed for the same reason, once the quinn transport join to a peer, and the peer will keep the connection for a while, so the address will always be used, so even stop and restart by using the same address, the address already in used will be reported.) - - - leave_snapshot_recovery (address already in used) - - reconnect (address already in used) - - reconnect_same_ip (address already in used) - - snapshot_recovery (address already in used) - - update (address already in used) diff --git a/ruserf/test/main/quic.rs b/ruserf/test/main/quic.rs deleted file mode 100644 index a26ce8c..0000000 --- a/ruserf/test/main/quic.rs +++ /dev/null @@ -1,53 +0,0 @@ -#[path = "./quic/delegate.rs"] -mod delegate; - -#[path = "./quic/event.rs"] -mod event; - -#[path = "./quic/leave.rs"] -mod leave; - -#[path = "./quic/reap.rs"] -mod reap; - -#[path = "./quic/reconnect.rs"] -mod reconnect; - -#[path = "./quic/remove.rs"] -mod remove; - -#[path = "./quic/snapshot.rs"] -mod snapshot; - -#[path = "./quic/update.rs"] -mod update; - -#[path = "./quic/role.rs"] -mod role; - -#[path = "./quic/set_tags.rs"] -mod set_tags; - -#[path = "./quic/get_queue_max.rs"] -mod get_queue_max; - -#[path = "./quic/local_member.rs"] -mod local_member; - -#[path = "./quic/num_nodes.rs"] -mod num_nodes; - -#[path = "./quic/state.rs"] -mod state; - -#[path = "./quic/stats.rs"] -mod stats; - -#[path = "./quic/coordinates.rs"] -mod coordinates; - -#[path = "./quic/name_resolution.rs"] -mod name_resolution; - -#[path = "./quic/join.rs"] -mod join; diff --git a/ruserf/test/main/quic/coordinates.rs b/ruserf/test/main/quic/coordinates.rs deleted file mode 100644 index 44150eb..0000000 --- a/ruserf/test/main/quic/coordinates.rs +++ /dev/null @@ -1,86 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::{net::SocketAddr, time::Duration}; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer_with_connect_timeout, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{serf_coordinates, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_coordinates_v4() { - [< $rt:snake _run >](async move { - let name = "serf_coordinates1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_coordinates2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_coordinates3_v4"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v4(0)); - - serf_coordinates::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - - #[test] - fn test_serf_coordinates_v6() { - [< $rt:snake _run >](async move { - let name = "serf_coordinates1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_coordinates2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v6()); - - let name = "serf_coordinates3_v6"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v6()); - - serf_coordinates::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/delegate.rs b/ruserf/test/main/quic/delegate.rs deleted file mode 100644 index db882bd..0000000 --- a/ruserf/test/main/quic/delegate.rs +++ /dev/null @@ -1,11 +0,0 @@ -#[path = "./delegate/nodemeta.rs"] -mod nodemeta; - -#[path = "./delegate/local_state.rs"] -mod local_state; - -#[path = "./delegate/remote_state.rs"] -mod remote_state; - -#[path = "./delegate/ping_delegate.rs"] -mod ping_delegate; diff --git a/ruserf/test/main/quic/delegate/local_state.rs b/ruserf/test/main/quic/delegate/local_state.rs deleted file mode 100644 index f42bd4c..0000000 --- a/ruserf/test/main/quic/delegate/local_state.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{delegate::delegate_local_state, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_delegate_local_state_v4() { - [< $rt:snake _run >](async move { - let name = "delegate_local_state1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "delegate_local_state2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - delegate_local_state::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_delegate_local_state_v6() { - [< $rt:snake _run >](async move { - let name = "delegate_local_state1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "delegate_local_state2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - delegate_local_state::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/delegate/nodemeta.rs b/ruserf/test/main/quic/delegate/nodemeta.rs deleted file mode 100644 index 7b15a93..0000000 --- a/ruserf/test/main/quic/delegate/nodemeta.rs +++ /dev/null @@ -1,106 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{delegate::{delegate_nodemeta, delegate_nodemeta_panic}, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_delegate_nodemeta_v4() { - [< $rt:snake _run >](async move { - let name = "delegate_nodemeta_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - delegate_nodemeta::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - fn test_delegate_nodemeta_v6() { - [< $rt:snake _run >](async move { - let name = "delegate_nodemeta_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - delegate_nodemeta::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - #[should_panic] - fn test_delegate_nodemeta_panic_v4() { - [< $rt:snake _run >](async move { - let name = "delegate_nodemeta_panic_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - delegate_nodemeta_panic::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - #[should_panic] - fn test_delegate_nodemeta_panic_v6() { - [< $rt:snake _run >](async move { - let name = "delegate_nodemeta_panic_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - delegate_nodemeta_panic::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/delegate/ping_delegate.rs b/ruserf/test/main/quic/delegate/ping_delegate.rs deleted file mode 100644 index 622885b..0000000 --- a/ruserf/test/main/quic/delegate/ping_delegate.rs +++ /dev/null @@ -1,124 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{delegate::{serf_ping_delegate_versioning, serf_ping_delegate_rogue_coordinate}, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_ping_delegate_versioning_v4() { - [< $rt:snake _run >](async move { - let name = "serf_ping_delegate_versioning1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_ping_delegate_versioning2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_ping_delegate_versioning::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_delegate_serf_ping_delegate_versioning_v6() { - [< $rt:snake _run >](async move { - let name = "serf_ping_delegate_versioning1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_ping_delegate_versioning2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_ping_delegate_versioning::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_ping_delegate_rogue_coordinate_v4() { - [< $rt:snake _run >](async move { - let name = "serf_ping_delegate_rogue_coordinate1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_ping_delegate_rogue_coordinate2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_ping_delegate_rogue_coordinate::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_ping_delegate_rogue_coordinate_v6() { - [< $rt:snake _run >](async move { - let name = "serf_ping_delegate_rogue_coordinate1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_ping_delegate_rogue_coordinate2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_ping_delegate_rogue_coordinate::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/delegate/remote_state.rs b/ruserf/test/main/quic/delegate/remote_state.rs deleted file mode 100644 index 2c0a3f2..0000000 --- a/ruserf/test/main/quic/delegate/remote_state.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{delegate::delegate_merge_remote_state, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_delegate_merge_remote_state_v4() { - [< $rt:snake _run >](async move { - let name = "delegate_merge_remote_state_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - delegate_merge_remote_state::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - fn test_delegate_merge_remote_state_v6() { - [< $rt:snake _run >](async move { - let name = "delegate_merge_remote_state_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - delegate_merge_remote_state::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/event.rs b/ruserf/test/main/quic/event.rs deleted file mode 100644 index 2a0e0fb..0000000 --- a/ruserf/test/main/quic/event.rs +++ /dev/null @@ -1,56 +0,0 @@ -#[path = "./event/default_query.rs"] -mod default_query; - -#[path = "./event/event_user_size_limit.rs"] -mod event_user_size_limit; - -#[path = "./event/event_user.rs"] -mod event_user; - -#[path = "./event/events_failed.rs"] -mod events_failed; - -#[path = "./event/events_join.rs"] -mod events_join; - -#[path = "./event/events_leave_avoid_infinite_rebroadcast.rs"] -mod events_leave_avoid_infinite_rebroadcast; - -#[path = "./event/events_leave.rs"] -mod events_leave; - -#[path = "./event/query_deduplicate.rs"] -mod query_deduplicate; - -#[path = "./event/query_filter.rs"] -mod query_filter; - -#[path = "./event/query_old_message.rs"] -mod query_old_message; - -#[path = "./event/query_params_encode_filters.rs"] -mod query_params_encode_filters; - -#[path = "./event/query.rs"] -mod query; - -#[path = "./event/query_same_clock.rs"] -mod query_same_clock; - -#[path = "./event/query_size_limit.rs"] -mod query_size_limit; - -#[path = "./event/query_size_limit_increased.rs"] -mod query_size_limit_increased; - -#[path = "./event/remove_failed_events_leave.rs"] -mod remove_failed_events_leave; - -#[path = "./event/should_process.rs"] -mod should_process; - -#[path = "./event/user_event_old_message.rs"] -mod user_event_old_message; - -#[path = "./event/user_event_same_clock.rs"] -mod user_event_same_clock; diff --git a/ruserf/test/main/quic/event/default_query.rs b/ruserf/test/main/quic/event/default_query.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/default_query.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/event_user.rs b/ruserf/test/main/quic/event/event_user.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/event_user.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/event_user_size_limit.rs b/ruserf/test/main/quic/event/event_user_size_limit.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/event_user_size_limit.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/events_failed.rs b/ruserf/test/main/quic/event/events_failed.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/events_failed.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/events_join.rs b/ruserf/test/main/quic/event/events_join.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/events_join.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/events_leave.rs b/ruserf/test/main/quic/event/events_leave.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/events_leave.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/events_leave_avoid_infinite_rebroadcast.rs b/ruserf/test/main/quic/event/events_leave_avoid_infinite_rebroadcast.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/events_leave_avoid_infinite_rebroadcast.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/query.rs b/ruserf/test/main/quic/event/query.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/query.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/query_deduplicate.rs b/ruserf/test/main/quic/event/query_deduplicate.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/query_deduplicate.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/query_filter.rs b/ruserf/test/main/quic/event/query_filter.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/query_filter.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/query_old_message.rs b/ruserf/test/main/quic/event/query_old_message.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/query_old_message.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/query_params_encode_filters.rs b/ruserf/test/main/quic/event/query_params_encode_filters.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/query_params_encode_filters.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/query_same_clock.rs b/ruserf/test/main/quic/event/query_same_clock.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/query_same_clock.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/query_size_limit.rs b/ruserf/test/main/quic/event/query_size_limit.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/query_size_limit.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/query_size_limit_increased.rs b/ruserf/test/main/quic/event/query_size_limit_increased.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/query_size_limit_increased.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/remove_failed_events_leave.rs b/ruserf/test/main/quic/event/remove_failed_events_leave.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/remove_failed_events_leave.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/should_process.rs b/ruserf/test/main/quic/event/should_process.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/should_process.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/user_event_old_message.rs b/ruserf/test/main/quic/event/user_event_old_message.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/user_event_old_message.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/event/user_event_same_clock.rs b/ruserf/test/main/quic/event/user_event_same_clock.rs deleted file mode 100644 index 8b13789..0000000 --- a/ruserf/test/main/quic/event/user_event_same_clock.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/ruserf/test/main/quic/get_queue_max.rs b/ruserf/test/main/quic/get_queue_max.rs deleted file mode 100644 index 61e08c0..0000000 --- a/ruserf/test/main/quic/get_queue_max.rs +++ /dev/null @@ -1,72 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{serf_get_queue_max, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_get_queue_max_v4() { - [< $rt:snake _run >](async move { - let name = "serf_get_queue_max_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - serf_get_queue_max::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, |idx| { - format!("127.0.0.1:{idx}").parse().unwrap() - }).await - }); - } - - #[test] - fn test_serf_get_queue_max_v6() { - [< $rt:snake _run >](async move { - let name = "serf_get_queue_max_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - serf_get_queue_max::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, |idx| { - format!("127.0.0.1:{idx}").parse().unwrap() - }).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join.rs b/ruserf/test/main/quic/join.rs deleted file mode 100644 index 71f84d8..0000000 --- a/ruserf/test/main/quic/join.rs +++ /dev/null @@ -1,32 +0,0 @@ -#[path = "./join/intent_buffer_early.rs"] -mod intent_buffer_early; - -#[path = "./join/intent_newer.rs"] -mod intent_newer; - -#[path = "./join/intent_old_message.rs"] -mod intent_old_message; - -#[path = "./join/intent_reset_leaving.rs"] -mod intent_reset_leaving; - -#[path = "./join/join_cancel.rs"] -mod join_cancel; - -#[path = "./join/join_ignore_old.rs"] -mod join_ignore_old; - -#[path = "./join/join_leave_join.rs"] -mod join_leave_join; - -#[path = "./join/join_leave.rs"] -mod join_leave; - -#[path = "./join/leave_ltime.rs"] -mod leave_ltime; - -#[path = "./join/pending_intent.rs"] -mod pending_intent; - -#[path = "./join/pending_intents.rs"] -mod pending_intents; diff --git a/ruserf/test/main/quic/join/intent_buffer_early.rs b/ruserf/test/main/quic/join/intent_buffer_early.rs deleted file mode 100644 index 1b91e41..0000000 --- a/ruserf/test/main/quic/join/intent_buffer_early.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::join_intent_buffer_early, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_join_intent_buffer_early_v4() { - [< $rt:snake _run >](async move { - let name = "join_intent_buffer_early_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - join_intent_buffer_early::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - fn test_join_intent_buffer_early_v6() { - [< $rt:snake _run >](async move { - let name = "join_intent_buffer_early_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - join_intent_buffer_early::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/intent_newer.rs b/ruserf/test/main/quic/join/intent_newer.rs deleted file mode 100644 index 7eb8664..0000000 --- a/ruserf/test/main/quic/join/intent_newer.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::join_intent_newer, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_join_intent_newer_v4() { - [< $rt:snake _run >](async move { - let name = "join_intent_newer_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - join_intent_newer::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_join_intent_newer_v6() { - [< $rt:snake _run >](async move { - let name = "join_intent_newer_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - join_intent_newer::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/intent_old_message.rs b/ruserf/test/main/quic/join/intent_old_message.rs deleted file mode 100644 index fbdac8a..0000000 --- a/ruserf/test/main/quic/join/intent_old_message.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::join_intent_old_message, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_join_intent_old_message_v4() { - [< $rt:snake _run >](async move { - let name = "join_intent_old_message_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - join_intent_old_message::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_join_intent_old_message_v6() { - [< $rt:snake _run >](async move { - let name = "join_intent_old_message_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - join_intent_old_message::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/intent_reset_leaving.rs b/ruserf/test/main/quic/join/intent_reset_leaving.rs deleted file mode 100644 index 58406ff..0000000 --- a/ruserf/test/main/quic/join/intent_reset_leaving.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::join_intent_reset_leaving, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_join_intent_reset_leaving_v4() { - [< $rt:snake _run >](async move { - let name = "join_intent_reset_leaving_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - join_intent_reset_leaving::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_join_intent_reset_leaving_v6() { - [< $rt:snake _run >](async move { - let name = "join_intent_reset_leaving_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - join_intent_reset_leaving::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/join_cancel.rs b/ruserf/test/main/quic/join/join_cancel.rs deleted file mode 100644 index 8b7d692..0000000 --- a/ruserf/test/main/quic/join/join_cancel.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::serf_join_cancel, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_join_cancel_v4() { - [< $rt:snake _run >](async move { - let name = "serf_join_cancel1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_join_cancel2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_join_cancel::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_join_cancel_v6() { - [< $rt:snake _run >](async move { - let name = "serf_join_cancel1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_join_cancel2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_join_cancel::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/join_ignore_old.rs b/ruserf/test/main/quic/join/join_ignore_old.rs deleted file mode 100644 index bc8441f..0000000 --- a/ruserf/test/main/quic/join/join_ignore_old.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::serf_join_ignore_old, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_join_ignore_old_v4() { - [< $rt:snake _run >](async move { - let name = "serf_join_ignore_old1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_join_ignore_old2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_join_ignore_old::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_join_ignore_old_v6() { - [< $rt:snake _run >](async move { - let name = "serf_join_ignore_old1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_join_ignore_old2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_join_ignore_old::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/join_leave.rs b/ruserf/test/main/quic/join/join_leave.rs deleted file mode 100644 index 45d89f9..0000000 --- a/ruserf/test/main/quic/join/join_leave.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::serf_join_leave, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_join_leave_v4() { - [< $rt:snake _run >](async move { - let name = "serf_join_leave1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_join_leave2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_join_leave::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_join_leave_v6() { - [< $rt:snake _run >](async move { - let name = "serf_join_leave1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_join_leave2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_join_leave::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/join_leave_join.rs b/ruserf/test/main/quic/join/join_leave_join.rs deleted file mode 100644 index 7322ca2..0000000 --- a/ruserf/test/main/quic/join/join_leave_join.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::serf_join_leave_join, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_join_leave_join_v4() { - [< $rt:snake _run >](async move { - let name = "serf_join_leave_join1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_join_leave_join2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_join_leave_join::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_join_leave_join_v6() { - [< $rt:snake _run >](async move { - let name = "serf_join_leave_join1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_join_leave_join2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_join_leave_join::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/leave_ltime.rs b/ruserf/test/main/quic/join/leave_ltime.rs deleted file mode 100644 index c92b6cc..0000000 --- a/ruserf/test/main/quic/join/leave_ltime.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::join_leave_ltime, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_join_leave_ltime_v4() { - [< $rt:snake _run >](async move { - let name = "join_leave_ltime1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "join_leave_ltime2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - join_leave_ltime::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_join_leave_ltime_v6() { - [< $rt:snake _run >](async move { - let name = "join_leave_ltime1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "join_leave_ltime2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - join_leave_ltime::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/pending_intent.rs b/ruserf/test/main/quic/join/pending_intent.rs deleted file mode 100644 index 9f87710..0000000 --- a/ruserf/test/main/quic/join/pending_intent.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::join_pending_intent, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_join_pending_intent_v4() { - [< $rt:snake _run >](async move { - let name = "join_pending_intent_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - join_pending_intent::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_join_pending_intent_v6() { - [< $rt:snake _run >](async move { - let name = "join_pending_intent_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - join_pending_intent::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/join/pending_intents.rs b/ruserf/test/main/quic/join/pending_intents.rs deleted file mode 100644 index 2aa7fbb..0000000 --- a/ruserf/test/main/quic/join/pending_intents.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{join::join_pending_intents, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_join_pending_intents_v4() { - [< $rt:snake _run >](async move { - let name = "join_pending_intents_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - join_pending_intents::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_join_pending_intents_v6() { - [< $rt:snake _run >](async move { - let name = "join_pending_intents_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - join_pending_intents::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/leave.rs b/ruserf/test/main/quic/leave.rs deleted file mode 100644 index a674696..0000000 --- a/ruserf/test/main/quic/leave.rs +++ /dev/null @@ -1,23 +0,0 @@ -#[path = "./leave/force_leave_failed.rs"] -mod force_leave_failed; - -#[path = "./leave/force_leave_leaving.rs"] -mod force_leave_leaving; - -#[path = "./leave/force_leave_left.rs"] -mod force_leave_left; - -#[path = "./leave/intent_buffer_early.rs"] -mod intent_buffer_early; - -#[path = "./leave/intent_newer.rs"] -mod intent_newer; - -#[path = "./leave/intent_old_message.rs"] -mod intent_old_message; - -#[path = "./leave/rejoin_different_role.rs"] -mod rejoin_different_role; - -#[path = "./leave/snapshot_recovery.rs"] -mod snapshot_recovery; diff --git a/ruserf/test/main/quic/leave/force_leave_failed.rs b/ruserf/test/main/quic/leave/force_leave_failed.rs deleted file mode 100644 index 6a78d2a..0000000 --- a/ruserf/test/main/quic/leave/force_leave_failed.rs +++ /dev/null @@ -1,86 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::{net::SocketAddr, time::Duration}; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer_with_connect_timeout, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{leave::serf_force_leave_failed, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_force_leave_failed_v4() { - [< $rt:snake _run >](async move { - let name = "serf_force_leave_failed1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_force_leave_failed2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_force_leave_failed3_v4"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v4(0)); - - serf_force_leave_failed::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - - #[test] - fn test_serf_force_leave_failed_v6() { - [< $rt:snake _run >](async move { - let name = "serf_force_leave_failed1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_force_leave_failed2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v6()); - - let name = "serf_force_leave_failed3_v6"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v6()); - - serf_force_leave_failed::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/leave/force_leave_leaving.rs b/ruserf/test/main/quic/leave/force_leave_leaving.rs deleted file mode 100644 index fee8553..0000000 --- a/ruserf/test/main/quic/leave/force_leave_leaving.rs +++ /dev/null @@ -1,86 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{leave::serf_force_leave_leaving, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_force_leave_leaving_v4() { - [< $rt:snake _run >](async move { - let name = "serf_force_leave_leaving1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_force_leave_leaving2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_force_leave_leaving3_v4"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts3.add_bind_address(next_socket_addr_v4(0)); - - serf_force_leave_leaving::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - - #[test] - fn test_serf_force_leave_leaving_v6() { - [< $rt:snake _run >](async move { - let name = "serf_force_leave_leaving1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_force_leave_leaving2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - let name = "serf_force_leave_leaving3_v6"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts3.add_bind_address(next_socket_addr_v6()); - - serf_force_leave_leaving::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/leave/force_leave_left.rs b/ruserf/test/main/quic/leave/force_leave_left.rs deleted file mode 100644 index 2e35775..0000000 --- a/ruserf/test/main/quic/leave/force_leave_left.rs +++ /dev/null @@ -1,86 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{leave::serf_force_leave_left, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_force_leave_left_v4() { - [< $rt:snake _run >](async move { - let name = "serf_force_leave_left1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_force_leave_left2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_force_leave_left3_v4"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts3.add_bind_address(next_socket_addr_v4(0)); - - serf_force_leave_left::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - - #[test] - fn test_serf_force_leave_left_v6() { - [< $rt:snake _run >](async move { - let name = "serf_force_leave_left1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_force_leave_left2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - let name = "serf_force_leave_left3_v6"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts3.add_bind_address(next_socket_addr_v6()); - - serf_force_leave_left::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/leave/intent_buffer_early.rs b/ruserf/test/main/quic/leave/intent_buffer_early.rs deleted file mode 100644 index af7999f..0000000 --- a/ruserf/test/main/quic/leave/intent_buffer_early.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{leave::leave_intent_buffer_early, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_leave_intent_buffer_early_v4() { - [< $rt:snake _run >](async move { - let name = "leave_intent_buffer_early_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - leave_intent_buffer_early::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - fn test_leave_intent_buffer_early_v6() { - [< $rt:snake _run >](async move { - let name = "leave_intent_buffer_early_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - leave_intent_buffer_early::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/leave/intent_newer.rs b/ruserf/test/main/quic/leave/intent_newer.rs deleted file mode 100644 index 5dd4e6f..0000000 --- a/ruserf/test/main/quic/leave/intent_newer.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{leave::leave_intent_newer, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_leave_intent_newer_v4() { - [< $rt:snake _run >](async move { - let name = "leave_intent_newer_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - leave_intent_newer::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_leave_intent_newer_v6() { - [< $rt:snake _run >](async move { - let name = "leave_intent_newer_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - leave_intent_newer::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/leave/intent_old_message.rs b/ruserf/test/main/quic/leave/intent_old_message.rs deleted file mode 100644 index d3a7841..0000000 --- a/ruserf/test/main/quic/leave/intent_old_message.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{leave::leave_intent_old_message, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_leave_intent_old_message_v4() { - [< $rt:snake _run >](async move { - let name = "leave_intent_old_message_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - leave_intent_old_message::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_leave_intent_old_message_v6() { - [< $rt:snake _run >](async move { - let name = "leave_intent_old_message_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - leave_intent_old_message::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/leave/rejoin_different_role.rs b/ruserf/test/main/quic/leave/rejoin_different_role.rs deleted file mode 100644 index 907d26d..0000000 --- a/ruserf/test/main/quic/leave/rejoin_different_role.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{leave::serf_leave_rejoin_different_role, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_leave_rejoin_different_role_v4() { - [< $rt:snake _run >](async move { - let name = "serf_leave_rejoin_different_role1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_leave_rejoin_different_role2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_leave_rejoin_different_role::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_leave_rejoin_different_role_v6() { - [< $rt:snake _run >](async move { - let name = "serf_leave_rejoin_different_role1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_leave_rejoin_different_role2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_leave_rejoin_different_role::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/leave/snapshot_recovery.rs b/ruserf/test/main/quic/leave/snapshot_recovery.rs deleted file mode 100644 index fd669ee..0000000 --- a/ruserf/test/main/quic/leave/snapshot_recovery.rs +++ /dev/null @@ -1,88 +0,0 @@ -// macro_rules! test_mod { -// ($rt:ident) => { -// paste::paste! { -// mod [< $rt:snake >] { -// use std::{net::SocketAddr, time::Duration}; - -// use crate::[< $rt:snake _run >]; -// use ruserf::{ -// transport::resolver::socket_addr::SocketAddrResolver, -// quic::{ -// stream_layer::quinn::Quinn, QuicTransport, -// QuicTransportOptions, -// tests::quinn_stream_layer_with_connect_timeout, -// }, -// [< $rt:snake >]::[< $rt:camel Runtime >], -// transport::Lpe, -// }; -// use ruserf_core::tests::{leave::serf_leave_snapshot_recovery, next_socket_addr_v4, next_socket_addr_v6}; -// use smol_str::SmolStr; - -// #[test] -// fn test_serf_leave_snapshot_recovery_v4() { -// [< $rt:snake _run >](async move { -// let name = "serf_leave_snapshot_recovery1_v4"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts.add_bind_address(next_socket_addr_v4(0)); - -// let name = "serf_leave_snapshot_recovery2_v4"; -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(next_socket_addr_v4(0)); - -// serf_leave_snapshot_recovery::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _ -// >(opts, opts2, |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } - -// #[test] -// fn test_serf_leave_snapshot_recovery_v6() { -// [< $rt:snake _run >](async move { -// let name = "serf_leave_snapshot_recovery1_v6"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts.add_bind_address(next_socket_addr_v6()); - -// let name = "serf_leave_snapshot_recovery2_v6"; -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(next_socket_addr_v6()); - -// serf_leave_snapshot_recovery::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _ -// >(opts, opts2, |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } -// } -// } -// }; -// } - -// #[cfg(feature = "tokio")] -// test_mod!(tokio); - -// #[cfg(feature = "async-std")] -// test_mod!(async_std); - -// #[cfg(feature = "smol")] -// test_mod!(smol); diff --git a/ruserf/test/main/quic/local_member.rs b/ruserf/test/main/quic/local_member.rs deleted file mode 100644 index 8c4235c..0000000 --- a/ruserf/test/main/quic/local_member.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{serf_local_member, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_local_member_v4() { - [< $rt:snake _run >](async move { - let name = "serf_local_member_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - serf_local_member::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - fn test_serf_local_member_v6() { - [< $rt:snake _run >](async move { - let name = "serf_local_member_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - serf_local_member::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/name_resolution.rs b/ruserf/test/main/quic/name_resolution.rs deleted file mode 100644 index ee9396b..0000000 --- a/ruserf/test/main/quic/name_resolution.rs +++ /dev/null @@ -1,86 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::{net::SocketAddr, time::Duration}; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer_with_connect_timeout, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{serf_name_resolution, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_name_resolution_v4() { - [< $rt:snake _run >](async move { - let name = "serf_name_resolution1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_name_resolution2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_name_resolution3_v4"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v4(0)); - - serf_name_resolution::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3, |opts, id| opts.with_id(id)).await; - }); - } - - #[test] - fn test_serf_name_resolution_v6() { - [< $rt:snake _run >](async move { - let name = "serf_name_resolution1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_name_resolution2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v6()); - - let name = "serf_name_resolution3_v6"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v6()); - - serf_name_resolution::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3, |opts, id| opts.with_id(id)).await; - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/num_nodes.rs b/ruserf/test/main/quic/num_nodes.rs deleted file mode 100644 index 903f5d5..0000000 --- a/ruserf/test/main/quic/num_nodes.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{serf_num_nodes, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_num_nodes_v4() { - [< $rt:snake _run >](async move { - let name = "serf_num_nodes1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_num_nodes2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_num_nodes::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_num_nodes_v6() { - [< $rt:snake _run >](async move { - let name = "serf_num_nodes1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_num_nodes2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_num_nodes::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/reap.rs b/ruserf/test/main/quic/reap.rs deleted file mode 100644 index a428f1a..0000000 --- a/ruserf/test/main/quic/reap.rs +++ /dev/null @@ -1,9 +0,0 @@ -#[allow(clippy::module_inception)] -#[path = "./reap/reap.rs"] -mod reap; - -#[path = "./reap/handler.rs"] -mod handler; - -#[path = "./reap/handler_shutdown.rs"] -mod handler_shutdown; diff --git a/ruserf/test/main/quic/reap/handler.rs b/ruserf/test/main/quic/reap/handler.rs deleted file mode 100644 index 12964d9..0000000 --- a/ruserf/test/main/quic/reap/handler.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{reap::serf_reap_handler, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_reap_handler_v4() { - [< $rt:snake _run >](async move { - let name = "serf_reap_handler_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - serf_reap_handler::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_serf_reap_handler_v6() { - [< $rt:snake _run >](async move { - let name = "serf_reap_handler_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - serf_reap_handler::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/reap/handler_shutdown.rs b/ruserf/test/main/quic/reap/handler_shutdown.rs deleted file mode 100644 index fcbc791..0000000 --- a/ruserf/test/main/quic/reap/handler_shutdown.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{reap::serf_reap_handler_shutdown, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_reap_handler_shutdown_v4() { - [< $rt:snake _run >](async move { - let name = "serf_reap_handler_shutdown_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - serf_reap_handler_shutdown::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - fn test_serf_reap_handler_shutdown_v6() { - [< $rt:snake _run >](async move { - let name = "serf_reap_handler_shutdown_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - serf_reap_handler_shutdown::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/reap/reap.rs b/ruserf/test/main/quic/reap/reap.rs deleted file mode 100644 index b7a5007..0000000 --- a/ruserf/test/main/quic/reap/reap.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{reap::serf_reap, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_reap_v4() { - [< $rt:snake _run >](async move { - let name = "serf_reap_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - serf_reap::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_serf_reap_v6() { - [< $rt:snake _run >](async move { - let name = "serf_reap_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - serf_reap::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/reconnect.rs b/ruserf/test/main/quic/reconnect.rs deleted file mode 100644 index 89dc411..0000000 --- a/ruserf/test/main/quic/reconnect.rs +++ /dev/null @@ -1,9 +0,0 @@ -#[allow(clippy::module_inception)] -#[path = "./reconnect/reconnect.rs"] -mod reconnect; - -#[path = "./reconnect/same_ip.rs"] -mod same_ip; - -#[path = "./reconnect/timeout.rs"] -mod timeout; diff --git a/ruserf/test/main/quic/reconnect/reconnect.rs b/ruserf/test/main/quic/reconnect/reconnect.rs deleted file mode 100644 index 4a3fa83..0000000 --- a/ruserf/test/main/quic/reconnect/reconnect.rs +++ /dev/null @@ -1,88 +0,0 @@ -// macro_rules! test_mod { -// ($rt:ident) => { -// paste::paste! { -// mod [< $rt:snake >] { -// use std::{net::SocketAddr, time::Duration}; - -// use crate::[< $rt:snake _run >]; -// use ruserf::{ -// transport::resolver::socket_addr::SocketAddrResolver, -// quic::{ -// stream_layer::quinn::Quinn, QuicTransport, -// QuicTransportOptions, -// tests::quinn_stream_layer_with_connect_timeout, -// }, -// [< $rt:snake >]::[< $rt:camel Runtime >], -// transport::Lpe, -// }; -// use ruserf_core::tests::{reconnect::serf_reconnect, next_socket_addr_v4, next_socket_addr_v6}; -// use smol_str::SmolStr; - -// #[test] -// fn test_serf_reconnect_v4() { -// [< $rt:snake _run >](async move { -// let name = "serf_reconnect1_v4"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts.add_bind_address(next_socket_addr_v4(0)); - -// let name = "serf_reconnect2_v4"; -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(next_socket_addr_v4(0)); - -// serf_reconnect::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _, -// >(opts, opts2, |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } - -// #[test] -// fn test_serf_reconnect_v6() { -// [< $rt:snake _run >](async move { -// let name = "serf_reconnect1_v6"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts.add_bind_address(next_socket_addr_v6()); - -// let name = "serf_reconnect2_v6"; -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(next_socket_addr_v6()); - -// serf_reconnect::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _, -// >(opts, opts2, |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } -// } -// } -// }; -// } - -// #[cfg(feature = "tokio")] -// test_mod!(tokio); - -// #[cfg(feature = "async-std")] -// test_mod!(async_std); - -// #[cfg(feature = "smol")] -// test_mod!(smol); diff --git a/ruserf/test/main/quic/reconnect/same_ip.rs b/ruserf/test/main/quic/reconnect/same_ip.rs deleted file mode 100644 index 444a332..0000000 --- a/ruserf/test/main/quic/reconnect/same_ip.rs +++ /dev/null @@ -1,86 +0,0 @@ -// macro_rules! test_mod { -// ($rt:ident) => { -// paste::paste! { -// mod [< $rt:snake >] { -// use std::{net::SocketAddr, time::Duration}; - -// use crate::[< $rt:snake _run >]; -// use ruserf::{ -// transport::resolver::socket_addr::SocketAddrResolver, -// quic::{ -// stream_layer::quinn::Quinn, QuicTransport, -// QuicTransportOptions, -// tests::quinn_stream_layer_with_connect_timeout, -// }, -// [< $rt:snake >]::[< $rt:camel Runtime >], -// transport::Lpe, -// }; -// use ruserf_core::tests::{reconnect::serf_reconnect_same_ip, next_socket_addr_v4, next_socket_addr_v6}; -// use smol_str::SmolStr; - -// #[test] -// fn test_serf_reconnect_same_ip_v4() { -// [< $rt:snake _run >](async move { -// let name = "serf_reconnect_same_ip1_v4"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts.add_bind_address(next_socket_addr_v4(0)); - -// let name = "serf_reconnect_same_ip2_v4"; - -// serf_reconnect_same_ip::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _, -// _, -// >(opts, name.into(), |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } - -// #[test] -// fn test_serf_reconnect_same_ip_v6() { -// [< $rt:snake _run >](async move { -// let name = "serf_reconnect_same_ip1_v6"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts.add_bind_address(next_socket_addr_v6()); - -// let name = "serf_reconnect_same_ip2_v6"; - -// serf_reconnect_same_ip::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _, -// _, -// >(opts, name.into(), |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } -// } -// } -// }; -// } - -// #[cfg(feature = "tokio")] -// test_mod!(tokio); - -// #[cfg(feature = "async-std")] -// test_mod!(async_std); - -// #[cfg(feature = "smol")] -// test_mod!(smol); diff --git a/ruserf/test/main/quic/reconnect/timeout.rs b/ruserf/test/main/quic/reconnect/timeout.rs deleted file mode 100644 index 9c90cb7..0000000 --- a/ruserf/test/main/quic/reconnect/timeout.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::{net::SocketAddr, time::Duration}; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer_with_connect_timeout, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{reconnect::serf_per_node_reconnect_timeout, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_per_node_reconnect_timeout_v4() { - [< $rt:snake _run >](async move { - let name = "serf_per_node_reconnect_timeout1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_per_node_reconnect_timeout2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_per_node_reconnect_timeout::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_per_node_reconnect_timeout_v6() { - [< $rt:snake _run >](async move { - let name = "serf_per_node_reconnect_timeout1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_per_node_reconnect_timeout2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_per_node_reconnect_timeout::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/remove.rs b/ruserf/test/main/quic/remove.rs deleted file mode 100644 index 632b6be..0000000 --- a/ruserf/test/main/quic/remove.rs +++ /dev/null @@ -1,8 +0,0 @@ -#[path = "./remove/failed_node.rs"] -mod failed_node; - -#[path = "./remove/failed_node_prune.rs"] -mod failed_node_prune; - -#[path = "./remove/failed_node_ourself.rs"] -mod failed_node_ourself; diff --git a/ruserf/test/main/quic/remove/failed_node.rs b/ruserf/test/main/quic/remove/failed_node.rs deleted file mode 100644 index 0d7155b..0000000 --- a/ruserf/test/main/quic/remove/failed_node.rs +++ /dev/null @@ -1,86 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::{net::SocketAddr, time::Duration}; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer_with_connect_timeout, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{remove::serf_remove_failed_node, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_remove_failed_node_v4() { - [< $rt:snake _run >](async move { - let name = "serf_remove_failed_node1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_remove_failed_node2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_remove_failed_node3_v4"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v4(0)); - - serf_remove_failed_node::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - - #[test] - fn test_serf_remove_failed_node_v6() { - [< $rt:snake _run >](async move { - let name = "serf_remove_failed_node1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_remove_failed_node2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v6()); - - let name = "serf_remove_failed_node3_v6"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v6()); - - serf_remove_failed_node::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/remove/failed_node_ourself.rs b/ruserf/test/main/quic/remove/failed_node_ourself.rs deleted file mode 100644 index f3b3122..0000000 --- a/ruserf/test/main/quic/remove/failed_node_ourself.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{remove::serf_remove_failed_node_ourself, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_remove_failed_node_ourself_v4() { - [< $rt:snake _run >](async move { - let name = "serf_remove_failed_node_ourself_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - serf_remove_failed_node_ourself::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - fn test_serf_remove_failed_node_ourself_v6() { - [< $rt:snake _run >](async move { - let name = "serf_remove_failed_node_ourself_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - serf_remove_failed_node_ourself::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/remove/failed_node_prune.rs b/ruserf/test/main/quic/remove/failed_node_prune.rs deleted file mode 100644 index 4374aa3..0000000 --- a/ruserf/test/main/quic/remove/failed_node_prune.rs +++ /dev/null @@ -1,86 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::{net::SocketAddr, time::Duration}; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer_with_connect_timeout, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{remove::serf_remove_failed_node_prune, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_remove_failed_node_prune_v4() { - [< $rt:snake _run >](async move { - let name = "serf_remove_failed_node_prune1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_remove_failed_node_prune2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_remove_failed_node_prune3_v4"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v4(0)); - - serf_remove_failed_node_prune::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - - #[test] - fn test_serf_remove_failed_node_prune_v6() { - [< $rt:snake _run >](async move { - let name = "serf_remove_failed_node_prune1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_remove_failed_node_prune2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts2.add_bind_address(next_socket_addr_v6()); - - let name = "serf_remove_failed_node_prune3_v6"; - let mut opts3 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await); - opts3.add_bind_address(next_socket_addr_v6()); - - serf_remove_failed_node_prune::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2, opts3).await; - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/role.rs b/ruserf/test/main/quic/role.rs deleted file mode 100644 index 39c213a..0000000 --- a/ruserf/test/main/quic/role.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{serf_role, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_role_v4() { - [< $rt:snake _run >](async move { - let name = "serf_role1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_role2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_role::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_role_v6() { - [< $rt:snake _run >](async move { - let name = "serf_role1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_role2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_role::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/set_tags.rs b/ruserf/test/main/quic/set_tags.rs deleted file mode 100644 index 82c0409..0000000 --- a/ruserf/test/main/quic/set_tags.rs +++ /dev/null @@ -1,78 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{serf_set_tags, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_set_tags_v4() { - [< $rt:snake _run >](async move { - let name = "serf_set_tags1_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - - let name = "serf_set_tags2_v4"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v4(0)); - - serf_set_tags::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - - #[test] - fn test_serf_set_tags_v6() { - [< $rt:snake _run >](async move { - let name = "serf_set_tags1_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - - let name = "serf_set_tags2_v6"; - let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts2.add_bind_address(next_socket_addr_v6()); - - serf_set_tags::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, opts2).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/snapshot.rs b/ruserf/test/main/quic/snapshot.rs deleted file mode 100644 index d681f49..0000000 --- a/ruserf/test/main/quic/snapshot.rs +++ /dev/null @@ -1,14 +0,0 @@ -#[path = "./snapshot/snapshoter.rs"] -mod snapshoter; - -#[path = "./snapshot/snapshoter_leave.rs"] -mod snapshoter_leave; - -#[path = "./snapshot/snapshoter_leave_rejoin.rs"] -mod snapshoter_leave_rejoin; - -#[path = "./snapshot/snapshoter_recovery.rs"] -mod snapshoter_recovery; - -#[path = "./snapshot/snapshoter_force_compact.rs"] -mod snapshoter_force_compact; diff --git a/ruserf/test/main/quic/snapshot/snapshoter.rs b/ruserf/test/main/quic/snapshot/snapshoter.rs deleted file mode 100644 index f9cc76a..0000000 --- a/ruserf/test/main/quic/snapshot/snapshoter.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{snapshot::snapshoter, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_snapshoter_v4() { - [< $rt:snake _run >](async move { - let name = "snapshoter_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - snapshoter::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_snapshoter_v6() { - [< $rt:snake _run >](async move { - let name = "snapshoter_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - snapshoter::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/snapshot/snapshoter_force_compact.rs b/ruserf/test/main/quic/snapshot/snapshoter_force_compact.rs deleted file mode 100644 index 1f4eef3..0000000 --- a/ruserf/test/main/quic/snapshot/snapshoter_force_compact.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{snapshot::snapshoter_force_compact, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_snapshoter_force_compact_v4() { - [< $rt:snake _run >](async move { - let name = "snapshoter_force_compact_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - snapshoter_force_compact::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_snapshoter_force_compact_v6() { - [< $rt:snake _run >](async move { - let name = "snapshoter_force_compact_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - snapshoter_force_compact::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/snapshot/snapshoter_leave.rs b/ruserf/test/main/quic/snapshot/snapshoter_leave.rs deleted file mode 100644 index abf53a9..0000000 --- a/ruserf/test/main/quic/snapshot/snapshoter_leave.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{snapshot::snapshoter_leave, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_snapshoter_leave_v4() { - [< $rt:snake _run >](async move { - let name = "snapshoter_leave_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - snapshoter_leave::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_snapshoter_leave_v6() { - [< $rt:snake _run >](async move { - let name = "snapshoter_leave_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - snapshoter_leave::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/snapshot/snapshoter_leave_rejoin.rs b/ruserf/test/main/quic/snapshot/snapshoter_leave_rejoin.rs deleted file mode 100644 index 6ae967e..0000000 --- a/ruserf/test/main/quic/snapshot/snapshoter_leave_rejoin.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{snapshot::snapshoter_leave_rejoin, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_snapshoter_leave_rejoin_v4() { - [< $rt:snake _run >](async move { - let name = "snapshoter_leave_rejoin_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - snapshoter_leave_rejoin::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v4(0)).await - }); - } - - #[test] - fn test_snapshoter_leave_rejoin_v6() { - [< $rt:snake _run >](async move { - let name = "snapshoter_leave_rejoin_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - snapshoter_leave_rejoin::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts, next_socket_addr_v6()).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/snapshot/snapshoter_recovery.rs b/ruserf/test/main/quic/snapshot/snapshoter_recovery.rs deleted file mode 100644 index 88c45ba..0000000 --- a/ruserf/test/main/quic/snapshot/snapshoter_recovery.rs +++ /dev/null @@ -1,88 +0,0 @@ -// macro_rules! test_mod { -// ($rt:ident) => { -// paste::paste! { -// mod [< $rt:snake >] { -// use std::{net::SocketAddr, time::Duration}; - -// use crate::[< $rt:snake _run >]; -// use ruserf::{ -// transport::resolver::socket_addr::SocketAddrResolver, -// quic::{ -// stream_layer::quinn::Quinn, QuicTransport, -// QuicTransportOptions, -// tests::quinn_stream_layer_with_connect_timeout, -// }, -// [< $rt:snake >]::[< $rt:camel Runtime >], -// transport::Lpe, -// }; -// use ruserf_core::tests::{snapshot::serf_snapshot_recovery, next_socket_addr_v4, next_socket_addr_v6}; -// use smol_str::SmolStr; - -// #[test] -// fn test_serf_snapshot_recovery_v4() { -// [< $rt:snake _run >](async move { -// let name = "serf_snapshot_recovery1_v4"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts.add_bind_address(next_socket_addr_v4(0)); - -// let name = "serf_snapshot_recovery2_v4"; -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(next_socket_addr_v4(0)); - -// serf_snapshot_recovery::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _ -// >(opts, opts2, |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } - -// #[test] -// fn test_serf_snapshot_recovery_v6() { -// [< $rt:snake _run >](async move { -// let name = "serf_snapshot_recovery1_v6"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts.add_bind_address(next_socket_addr_v6()); - -// let name = "serf_snapshot_recovery2_v6"; -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(next_socket_addr_v6()); - -// serf_snapshot_recovery::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _, -// >(opts, opts2, |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(10)).await); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } -// } -// } -// }; -// } - -// #[cfg(feature = "tokio")] -// test_mod!(tokio); - -// #[cfg(feature = "async-std")] -// test_mod!(async_std); - -// #[cfg(feature = "smol")] -// test_mod!(smol); diff --git a/ruserf/test/main/quic/state.rs b/ruserf/test/main/quic/state.rs deleted file mode 100644 index 0e16eb4..0000000 --- a/ruserf/test/main/quic/state.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{serf_state, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_state_v4() { - [< $rt:snake _run >](async move { - let name = "serf_state_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - serf_state::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - fn test_serf_state_v6() { - [< $rt:snake _run >](async move { - let name = "serf_state_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - serf_state::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/stats.rs b/ruserf/test/main/quic/stats.rs deleted file mode 100644 index 5e5270d..0000000 --- a/ruserf/test/main/quic/stats.rs +++ /dev/null @@ -1,68 +0,0 @@ -macro_rules! test_mod { - ($rt:ident) => { - paste::paste! { - mod [< $rt:snake >] { - use std::net::SocketAddr; - - use crate::[< $rt:snake _run >]; - use ruserf::{ - transport::resolver::socket_addr::SocketAddrResolver, - quic::{ - stream_layer::quinn::Quinn, QuicTransport, - QuicTransportOptions, - tests::quinn_stream_layer, - }, - [< $rt:snake >]::[< $rt:camel Runtime >], - transport::Lpe, - }; - use ruserf_core::tests::{serf_stats, next_socket_addr_v4, next_socket_addr_v6}; - use smol_str::SmolStr; - - #[test] - fn test_serf_stats_v4() { - [< $rt:snake _run >](async move { - let name = "serf_stats_v4"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v4(0)); - serf_stats::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - - #[test] - fn test_serf_stats_v6() { - [< $rt:snake _run >](async move { - let name = "serf_stats_v6"; - let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer::<[< $rt:camel Runtime >]>().await); - opts.add_bind_address(next_socket_addr_v6()); - serf_stats::< - QuicTransport< - SmolStr, - SocketAddrResolver<[< $rt:camel Runtime >]>, - Quinn<[< $rt:camel Runtime >]>, - Lpe, - [< $rt:camel Runtime >], - >, - >(opts).await - }); - } - } - } - }; -} - -#[cfg(feature = "tokio")] -test_mod!(tokio); - -#[cfg(feature = "async-std")] -test_mod!(async_std); - -#[cfg(feature = "smol")] -test_mod!(smol); diff --git a/ruserf/test/main/quic/update.rs b/ruserf/test/main/quic/update.rs deleted file mode 100644 index b008100..0000000 --- a/ruserf/test/main/quic/update.rs +++ /dev/null @@ -1,88 +0,0 @@ -// macro_rules! test_mod { -// ($rt:ident) => { -// paste::paste! { -// mod [< $rt:snake >] { -// use std::{net::SocketAddr, time::Duration}; - -// use crate::[< $rt:snake _run >]; -// use ruserf::{ -// transport::resolver::socket_addr::SocketAddrResolver, -// quic::{ -// stream_layer::quinn::Quinn, QuicTransport, -// QuicTransportOptions, -// tests::quinn_stream_layer_with_connect_timeout, -// }, -// [< $rt:snake >]::[< $rt:camel Runtime >], -// transport::Lpe, -// }; -// use ruserf_core::tests::{serf_update, next_socket_addr_v4, next_socket_addr_v6}; -// use smol_str::SmolStr; - -// #[test] -// fn test_serf_update_v4() { -// [< $rt:snake _run >](async move { -// let name = "serf_update1_v4"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await).with_connection_pool_cleanup_period(Duration::from_millis(20)).with_connection_ttl(Some(Duration::from_millis(20))); -// opts.add_bind_address(next_socket_addr_v4(0)); - -// let name = "serf_update2_v4"; -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await).with_connection_pool_cleanup_period(Duration::from_millis(20)).with_connection_ttl(Some(Duration::from_millis(20))); -// opts2.add_bind_address(next_socket_addr_v4(0)); - -// serf_update::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _, -// >(opts, opts2, |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await).with_connection_pool_cleanup_period(Duration::from_millis(20)).with_connection_ttl(Some(Duration::from_millis(20))); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } - -// #[test] -// fn test_serf_update_v6() { -// [< $rt:snake _run >](async move { -// let name = "serf_update1_v6"; -// let mut opts = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await).with_connection_pool_cleanup_period(Duration::from_millis(20)).with_connection_ttl(Some(Duration::from_millis(20))); -// opts.add_bind_address(next_socket_addr_v6()); - -// let name = "serf_update2_v6"; -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(SmolStr::new(name), quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await).with_connection_pool_cleanup_period(Duration::from_millis(20)).with_connection_ttl(Some(Duration::from_millis(20))); -// opts2.add_bind_address(next_socket_addr_v6()); - -// serf_update::< -// QuicTransport< -// SmolStr, -// SocketAddrResolver<[< $rt:camel Runtime >]>, -// Quinn<[< $rt:camel Runtime >]>, -// Lpe, -// [< $rt:camel Runtime >], -// >, -// _, -// >(opts, opts2, |id, addr| async move { -// let mut opts2 = QuicTransportOptions::with_stream_layer_options(id, quinn_stream_layer_with_connect_timeout::<[< $rt:camel Runtime >]>(Duration::from_millis(20)).await).with_connection_ttl(Some(Duration::from_millis(20))); -// opts2.add_bind_address(addr); -// opts2 -// }).await -// }); -// } -// } -// } -// }; -// } - -// #[cfg(feature = "tokio")] -// test_mod!(tokio); - -// #[cfg(feature = "async-std")] -// test_mod!(async_std); - -// #[cfg(feature = "smol")] -// test_mod!(smol);