Skip to content

Commit

Permalink
[server] Initialize test cluster concurrently #1375 (#1376)
Browse files Browse the repository at this point in the history
Update cluster_test.rs
  • Loading branch information
michaelvlach authored Dec 10, 2024
1 parent ca3afef commit bba1e83
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions agdb_server/tests/routes/cluster_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ async fn create_cluster(nodes: usize) -> anyhow::Result<(ClusterServer, Vec<Clus
config.insert("cluster", cluster.clone().into());
}

for config in configs {
let server = TestServerImpl::with_config(config).await?;
for server in configs
.into_iter()
.map(|c| tokio::spawn(async move { TestServerImpl::with_config(c).await }))
{
let server = server.await??;
let client = Arc::new(RwLock::new(AgdbApi::new(
ReqwestClient::new(),
&server.address,
Expand Down

0 comments on commit bba1e83

Please sign in to comment.