testcontainers / testcontainers-hs

Docker containers for your integration tests! http://hackage.haskell.org/package/testcontainers
MIT License
58 stars 13 forks source link

waitForLine exception #2

Closed blackheaven closed 4 years ago

blackheaven commented 4 years ago

Following (the discussion)[https://github.com/alexbiehl/testcontainers-hs/pull/1#issuecomment-669820253] in #1 (I have tried it)[https://github.com/blackheaven/amqp-streamly/commit/a22392e91a1038ed108d4cc2a25c374f9fafcd3c]:

  container <- run $ containerRequest (fromTag "rabbitmq:3.8.4")
    & setWaitingFor (waitForLogLine Stdout (" completed with " `TL.isInfixOf`))
  liftIO $ mkChannel login password $ T.unpack $ containerIp container

But I have got this error:

  test/Network/AMQP/StreamlySpec.hs:30:7: 
  1) Network.AMQP.Streamly producing 5 messages should be consumed in the right order
       uncaught exception: UnexpectedEndOfPipe
       UnexpectedEndOfPipe {id = "0d93a0e143e11919dc90cd72b7fefa10c92fa8c33ff9c47c373a8c63f30eff0e"}

Can you have a look?

alexbiehl commented 4 years ago

Ah, yeah, found it. It was a missing --follow in the underlying docker logs subprocess.

alexbiehl commented 4 years ago

I pushed a fix to master

blackheaven commented 4 years ago

it works, thanks.