Class YugabyteDBYSQLWaitStrategy

java.lang.Object
org.testcontainers.containers.wait.strategy.AbstractWaitStrategy
org.testcontainers.containers.strategy.YugabyteDBYSQLWaitStrategy
All Implemented Interfaces:
org.testcontainers.containers.wait.strategy.WaitStrategy

public final class YugabyteDBYSQLWaitStrategy extends org.testcontainers.containers.wait.strategy.AbstractWaitStrategy
Custom wait strategy for YSQL API.

Though we can either use HTTP or PORT based wait strategy, when we create a custom database/role, it gets executed asynchronously. As the wait on container.start() on a specific port wouldn't fully guarantee the custom object execution. It's better to check the DB status with this way with a smoke test query that uses the underlying custom objects and wait for the operation to complete.

  • Field Summary

    Fields inherited from class org.testcontainers.containers.wait.strategy.AbstractWaitStrategy

    startupTimeout, waitStrategyTarget
  • Constructor Summary

    Constructors
    Constructor
    Description
    YugabyteDBYSQLWaitStrategy(org.testcontainers.containers.wait.strategy.WaitStrategyTarget target)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    waitUntilReady(org.testcontainers.containers.wait.strategy.WaitStrategyTarget target)
     

    Methods inherited from class org.testcontainers.containers.wait.strategy.AbstractWaitStrategy

    getLivenessCheckPorts, getRateLimiter, withRateLimiter, withStartupTimeout

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • YugabyteDBYSQLWaitStrategy

      public YugabyteDBYSQLWaitStrategy(org.testcontainers.containers.wait.strategy.WaitStrategyTarget target)
  • Method Details

    • waitUntilReady

      public void waitUntilReady(org.testcontainers.containers.wait.strategy.WaitStrategyTarget target)
      Specified by:
      waitUntilReady in interface org.testcontainers.containers.wait.strategy.WaitStrategy
      Overrides:
      waitUntilReady in class org.testcontainers.containers.wait.strategy.AbstractWaitStrategy
    • waitUntilReady

      public void waitUntilReady()
      Specified by:
      waitUntilReady in class org.testcontainers.containers.wait.strategy.AbstractWaitStrategy