Skip to content

Commit

Permalink
fix: wait conditions for postgres module
Browse files Browse the repository at this point in the history
Closes #158
  • Loading branch information
DDtKey committed Jul 7, 2024
1 parent 484b23d commit 6ba4d2f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/postgres/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use std::{borrow::Cow, collections::HashMap};

use testcontainers::{core::WaitFor, Image};
use testcontainers::{
core::{wait::LogWaitStrategy, WaitFor},
Image,
};

const NAME: &str = "postgres";
const TAG: &str = "11-alpine";
Expand Down Expand Up @@ -84,8 +87,8 @@ impl Image for Postgres {
}

fn ready_conditions(&self) -> Vec<WaitFor> {
vec![WaitFor::message_on_stderr(
"database system is ready to accept connections",
vec![WaitFor::log(
LogWaitStrategy::stderr("database system is ready to accept connections").with_times(2),
)]
}

Expand Down

0 comments on commit 6ba4d2f

Please sign in to comment.