diff --git a/src/test.rs b/src/test.rs index c757168..fb0ea22 100644 --- a/src/test.rs +++ b/src/test.rs @@ -34,10 +34,20 @@ async fn test_mysql() -> Result<(), Error> { let pool = TestPool::try_new().await?; crate::load_data(&pool).await?; time_test::time_test!(); - crate::convert_data(&pool, "employees").await?; - crate::convert_data(&pool, "departments").await?; - ::clone(&pool) - .disconnect() - .await?; + let tables = vec!["employees", "departments"]; + let mut handles: Vec>> = vec![]; + for table in tables { + handles.push(tokio::spawn({ + let pool = pool.clone(); + let table = table.to_string(); + async move { + crate::convert_data(&pool, &table).await?; + Ok(()) + } + })); + } + for handle in handles { + let _ = handle.await?; + } Ok(()) }