whisklabs / docker-it-scala

Docker integration testing kit with Scala
MIT License
431 stars 91 forks source link

Container fails to start properly because LogLineContains seems not to fully read the logs #17

Closed francisdb closed 8 years ago

francisdb commented 8 years ago

I'm trying to create a InfluxDB service like this:

trait DockerInfluxDBService extends DockerKit {

  val DefaultInfluxDBAdminPort = 8083
  val DefaultInfluxDBPort = 8086

  val influxdbContainer = DockerContainer("tutum/influxdb:latest")
    .withPorts(
      DefaultInfluxDBPort -> None,
      DefaultInfluxDBAdminPort -> None
    )
    .withReadyChecker(LogLineContains("Listening for signals"))
    //.withCommand("/run.sh")

  abstract override def dockerContainers: List[DockerContainer] = influxdbContainer :: super.dockerContainers
}

the server does not seem to fully start/logs are not fully read causing the LogLineContains to never succeed. (checked by creating my own LogLineContains) The HttpResponseCode check gives me a timeout. In kitematic the image runs perfectly and logs the line I wait for

francisdb commented 8 years ago

Could be related to the expected message being logged to stderr and that not being read by the LogLineContains

viktortnk commented 8 years ago

@francisdb Yeah, it could be. In latest version I made logs collection from stdErr as well

francisdb commented 8 years ago

I can confirm this is fixed, LogLineContains seems to catch stderr now.