Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/db/migration_fixup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ mod tests {
use std::collections::HashMap;
use std::path::PathBuf;

#[cfg(feature = "integration")]
static POSTGRES_MIGRATION_FIXUP_TEST_LOCK: tokio::sync::Mutex<()> =
tokio::sync::Mutex::const_new(());

fn migrations_dir() -> PathBuf {
PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("migrations")
}
Expand Down Expand Up @@ -647,6 +651,7 @@ mod tests {
return;
}
};
let _guard = POSTGRES_MIGRATION_FIXUP_TEST_LOCK.lock().await;

// Make sure refinery_schema_history exists. We can't rely on
// the test DB having had migrations run, so create it on
Expand Down Expand Up @@ -795,6 +800,7 @@ mod tests {
return;
}
};
let _guard = POSTGRES_MIGRATION_FIXUP_TEST_LOCK.lock().await;

// Make sure refinery_schema_history exists so we exercise the
// post-history-check branch (the early-return on missing table
Expand Down
Loading