http4s / blaze

Blazing fast NIO microframework and Http Parser
Apache License 2.0
351 stars 63 forks source link

Flaky blaze-client test: Use User-Agent header provided in Request #640

Open RaasAhsan opened 3 years ago

RaasAhsan commented 3 years ago

I'm going to start making issues for these so I can look at them in more detail some time.

==> X org.http4s.client.blaze.Http1ClientStageSuite.Use User-Agent header provided in Request  0.011s munit.FailException: /home/runner/work/http4s/http4s/blaze-client/src/test/scala/org/http4s/client/blaze/Http1ClientStageSuite.scala:207 assertion failed
206:      val requestLines = request.split("\r\n").toList
207:      assert(requestLines.contains("User-Agent: myagent"))
208:      assertEquals(response, "done")
    at munit.FunSuite.assert(FunSuite.scala:11)
    at org.http4s.client.blaze.Http1ClientStageSuite.$anonfun$new$30(Http1ClientStageSuite.scala:207)
    at org.http4s.client.blaze.Http1ClientStageSuite.$anonfun$new$30$adapted(Http1ClientStageSuite.scala:205)
    at cats.effect.IOFiber.mapK(IOFiber.scala:970)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:794)
    at cats.effect.IOFiber.mapK(IOFiber.scala:979)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:794)
    at cats.effect.IOFiber.uncancelableSuccessK(IOFiber.scala:1080)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:805)
    at cats.effect.IOFiber.unmaskSuccessK(IOFiber.scala:1097)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:806)
    at cats.effect.IOFiber.onCancelSuccessK(IOFiber.scala:1065)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:804)
    at cats.effect.IOFiber.asyncContinueR(IOFiber.scala:916)
    at cats.effect.IOFiber.run(IOFiber.scala:136)
    at cats.effect.unsafe.WorkerThread.runFiber(WorkerThread.scala:162)
    at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:295)
RaasAhsan commented 3 years ago

Another one, which I suspect is the same source of nondeterminism:

==> X org.http4s.client.blaze.Http1ClientStageSuite.Utilize a provided Host header  0.012s munit.FailException: /home/runner/work/http4s/http4s/blaze-client/src/test/scala/org/http4s/client/blaze/Http1ClientStageSuite.scala:185 assertion failed
184:      val requestLines = request.split("\r\n").toList
185:      assert(requestLines.contains("Host: bar.test"))
186:      assertEquals(response, "done")
    at munit.FunSuite.assert(FunSuite.scala:11)
    at org.http4s.client.blaze.Http1ClientStageSuite.$anonfun$new$20(Http1ClientStageSuite.scala:185)
    at org.http4s.client.blaze.Http1ClientStageSuite.$anonfun$new$20$adapted(Http1ClientStageSuite.scala:183)
    at cats.effect.IOFiber.mapK(IOFiber.scala:970)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:794)
    at cats.effect.IOFiber.mapK(IOFiber.scala:979)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:794)
    at cats.effect.IOFiber.uncancelableSuccessK(IOFiber.scala:1080)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:805)
    at cats.effect.IOFiber.unmaskSuccessK(IOFiber.scala:1097)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:806)
    at cats.effect.IOFiber.onCancelSuccessK(IOFiber.scala:1065)
    at cats.effect.IOFiber.succeeded(IOFiber.scala:804)
    at cats.effect.IOFiber.asyncContinueR(IOFiber.scala:916)
    at cats.effect.IOFiber.run(IOFiber.scala:136)
    at cats.effect.unsafe.WorkerThread.runFiber(WorkerThread.scala:162)
    at cats.effect.unsafe.WorkerThread.run(WorkerThread.scala:295)