ITV / scala-pact

A Scala implementation of CDC using the Pact standard
Other
107 stars 54 forks source link

Client request timeout #92

Closed e1ywka closed 6 years ago

e1ywka commented 6 years ago

Hello

I am using scala-pact on provider side.

   "com.itv"       %% "scalapact-circe-0-9"     % "2.2.3" % "test",
    "com.itv"       %% "scalapact-http4s-0-18-0" % "2.2.3" % "test",
    "com.itv"       %% "scalapact-scalatest"     % "2.2.3" % "test"

We set up privder before test and then verify it like this

verifyPact
        .withPactSource(loadFromLocal(pactFilePath))
        .noSetupRequired
        .runVerificationAgainst("localhost", 8194, 3 seconds)

But sometimes we get an error on the first checked pact Error in response: Client request timeout after 1666 milliseconds

I thought it is some default timeout of http4s lib. How am I able to configure all suitable timeouts?

e1ywka commented 6 years ago

Please look at com.itv.scalapact.shared.http.ScalaPactHttpClient:38 There is a hard coded value of client timeout.

Whould you able to port fix for scala 2.11 and sbt 0.13?

davesmith00000 commented 6 years ago

You're on this project board. I think it's time I did one last 2.11 release (it's a massive effort). https://github.com/ITV/scala-pact/projects/2

davesmith00000 commented 6 years ago

Change committed: https://github.com/ITV/scala-pact/commit/398724c25518bedd96a98d846a5fe5596537c468

davesmith00000 commented 6 years ago

Should be fixed now using version 2.2.5, would you like to confirm @e1ywka ?

e1ywka commented 6 years ago

@davesmith00000, yes, that is it. Thank you!

davesmith00000 commented 6 years ago

You're welcome - I've been meaning to fix that for ages! ;-)