Skip to content

Commit

Permalink
feat: removed integration test in the main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngha-Boris committed Feb 18, 2025
1 parent 2b2f38f commit b7ecbb5
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,42 +71,3 @@ fn config_tracing() {
.with(filter)
.init();
}

#[cfg(test)]
mod test {

use reqwest::Client;
use tokio::{task, time::Instant};

#[tokio::test]
async fn test() {
let client = Client::new();
let url = "https://didcomm-mediator.eudi-adorsys.com/";
let num_requests = 1000;

let mut handles = Vec::new();

let start = Instant::now();

for _ in 0..num_requests {
let client = client.clone();
let url = url.to_string();

let handle = task::spawn(async move {
match client.get(&url).send().await {
Ok(_resp) => (),
Err(e) => panic!("{}", e),
}
});

handles.push(handle);
}

for handle in handles {
let _ = handle.await;
}

let duration = start.elapsed();
println!("Completed {} requests in {:?}", num_requests, duration);
}
}

0 comments on commit b7ecbb5

Please sign in to comment.