Skip to content

Commit

Permalink
Merge pull request #66 from MutinyWallet/test-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman authored May 30, 2024
2 parents 8a2812f + 9e9ca9c commit fd34615
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!();
pub(crate) fn setup_db(url: &str, password: String) -> anyhow::Result<Arc<SQLConnection>> {
let manager = ConnectionManager::<SqliteConnection>::new(url);

// CI is slow, make timeout longer
let timeout = if std::env::var("CI").is_ok() {
Duration::from_secs(30)
} else {
Duration::from_secs(5)
};
// tests can be slow, make timeout longer
#[cfg(test)]
let timeout = Duration::from_secs(30);
#[cfg(not(test))]
let timeout = Duration::from_secs(5);

let pool = Pool::builder()
.max_size(50)
Expand Down

0 comments on commit fd34615

Please sign in to comment.