Tabnine Logo
LogMessageWaitStrategy
Code IndexAdd Tabnine to your IDE (free)

How to use
LogMessageWaitStrategy
in
org.testcontainers.containers.wait

Best Java code snippets using org.testcontainers.containers.wait.LogMessageWaitStrategy (Showing top 6 results out of 315)

origin: testcontainers/testcontainers-java

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));
}
origin: testcontainers/testcontainers-java

  /**
   * 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);
  }
}
origin: testcontainers/testcontainers-java

/**
 */
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());
}
origin: org.testcontainers/testcontainers

  /**
   * 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);
  }
}
origin: org.testcontainers/selenium

/**
 */
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());
}
origin: org.testcontainers/postgresql

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));
}
org.testcontainers.containers.waitLogMessageWaitStrategy

Javadoc

Waits until containers logs expected content.

Most used methods

  • <init>
  • withRegEx
  • withStartupTimeout
  • withTimes

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now