From 33f7de3b5ae71466391f63374bbc6699abfb611e Mon Sep 17 00:00:00 2001 From: Itay Tsabary Date: Tue, 4 Jun 2024 17:54:15 +0300 Subject: [PATCH] chore: move component client server test to tests dir commit-id:866c1c00 --- crates/mempool_infra/src/component_client.rs | 4 ---- .../{src => tests}/component_server_client_test.rs | 10 +++++----- 2 files changed, 5 insertions(+), 9 deletions(-) rename crates/mempool_infra/{src => tests}/component_server_client_test.rs (94%) diff --git a/crates/mempool_infra/src/component_client.rs b/crates/mempool_infra/src/component_client.rs index 0c97ba02..020bd6bd 100644 --- a/crates/mempool_infra/src/component_client.rs +++ b/crates/mempool_infra/src/component_client.rs @@ -2,10 +2,6 @@ use tokio::sync::mpsc::{channel, Sender}; use crate::component_definitions::ComponentRequestAndResponseSender; -#[cfg(test)] -#[path = "component_server_client_test.rs"] -mod component_server_client_test; - #[derive(Clone)] pub struct ComponentClient where diff --git a/crates/mempool_infra/src/component_server_client_test.rs b/crates/mempool_infra/tests/component_server_client_test.rs similarity index 94% rename from crates/mempool_infra/src/component_server_client_test.rs rename to crates/mempool_infra/tests/component_server_client_test.rs index 85216c20..3e0c7c59 100644 --- a/crates/mempool_infra/src/component_server_client_test.rs +++ b/crates/mempool_infra/tests/component_server_client_test.rs @@ -1,15 +1,15 @@ use async_trait::async_trait; +use starknet_mempool_infra::component_client::ComponentClient; +use starknet_mempool_infra::component_definitions::{ + ComponentRequestAndResponseSender, ComponentRequestHandler, +}; +use starknet_mempool_infra::component_server::ComponentServer; use tokio::sync::mpsc::{channel, Sender}; use tokio::task; -use crate::component_client::ComponentClient; - type ValueA = u32; type ValueB = u8; -use crate::component_definitions::{ComponentRequestAndResponseSender, ComponentRequestHandler}; -use crate::component_server::ComponentServer; - #[async_trait] trait ComponentATrait: Send + Sync { async fn a_get_value(&self) -> ValueA;