Skip to content

Instantly share code, notes, and snippets.

@zlandorf
Last active July 25, 2020 12:05
Show Gist options
  • Select an option

  • Save zlandorf/d2f00e4f77d98afb482bd42eec253b12 to your computer and use it in GitHub Desktop.

Select an option

Save zlandorf/d2f00e4f77d98afb482bd42eec253b12 to your computer and use it in GitHub Desktop.
// defined as a singleton in kotlin
object AxonServerContainer : GenericContainer<AxonServerContainer>("axoniq/axonserver") {
init {
withExposedPorts(8024, 8124)
// the container is ready when the below log message is posted
waitingFor(forLogMessage(".*Started AxonServer.*\\n", 1))
}
// this will allow us to know which host/port to connect to
val servers: String get() = "localhost:${getMappedPort(8124)}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment