5 more tests to go
This commit is contained in:
@@ -24,13 +24,17 @@ async fn get_root_connection() -> PgConnection {
|
||||
/// This is the key to test isolation.
|
||||
pub async fn setup_isolated_db() -> PgPool {
|
||||
let mut root_conn = get_root_connection().await;
|
||||
|
||||
|
||||
// Make schema names more unique - include timestamp + random
|
||||
let schema_name = format!(
|
||||
"test_{}",
|
||||
"test_{}_{}",
|
||||
std::time::SystemTime::now()
|
||||
.duration_since(std::time::UNIX_EPOCH)
|
||||
.unwrap()
|
||||
.as_nanos(),
|
||||
rand::thread_rng()
|
||||
// --- CHANGE 2: Pass a reference to Alphanumeric directly ---
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(12)
|
||||
.take(8)
|
||||
.map(char::from)
|
||||
.collect::<String>()
|
||||
.to_lowercase()
|
||||
|
||||
Reference in New Issue
Block a user