/** * Convenience method to return a WaitStrategy for log messages. * * @param regex the regex pattern to check for * @param times the number of times the pattern is expected * @return LogMessageWaitStrategy */ public static LogMessageWaitStrategy forLogMessage(String regex, int times) { return new LogMessageWaitStrategy().withRegEx(regex).withTimes(times); } }
public PostgreSQLContainer(final String dockerImageName) { super(dockerImageName); this.waitStrategy = new LogMessageWaitStrategy() .withRegEx(".*database system is ready to accept connections.*\\s") .withTimes(2) .withStartupTimeout(Duration.of(60, SECONDS)); }
/** */ public BrowserWebDriverContainer() { final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy() .withRegEx(".*(RemoteWebDriver instances should connect to|Selenium Server is up and running).*\n") .withStartupTimeout(Duration.of(15, SECONDS)); this.waitStrategy = new WaitAllStrategy() .withStrategy(logWaitStrategy) .withStrategy(new HostPortWaitStrategy()) .withStartupTimeout(Duration.of(15, SECONDS)); this.withRecordingFileFactory(new DefaultRecordingFileFactory()); }
/** * Convenience method to return a WaitStrategy for log messages. * * @param regex the regex pattern to check for * @param times the number of times the pattern is expected * @return LogMessageWaitStrategy */ public static LogMessageWaitStrategy forLogMessage(String regex, int times) { return new LogMessageWaitStrategy().withRegEx(regex).withTimes(times); } }
public PostgreSQLContainer(final String dockerImageName) { super(dockerImageName); this.waitStrategy = new LogMessageWaitStrategy() .withRegEx(".*database system is ready to accept connections.*\\s") .withTimes(2) .withStartupTimeout(Duration.of(60, SECONDS)); }
/** */ public BrowserWebDriverContainer() { final WaitStrategy logWaitStrategy = new LogMessageWaitStrategy() .withRegEx(".*(RemoteWebDriver instances should connect to|Selenium Server is up and running).*\n") .withStartupTimeout(Duration.of(15, SECONDS)); this.waitStrategy = new WaitAllStrategy() .withStrategy(logWaitStrategy) .withStrategy(new HostPortWaitStrategy()) .withStartupTimeout(Duration.of(15, SECONDS)); this.withRecordingFileFactory(new DefaultRecordingFileFactory()); }