http4s icon indicating copy to clipboard operation
http4s copied to clipboard

`KeepAliveSuite` flake

Open armanbilge opened this issue 3 years ago • 4 comments

I saw this on a JS run, but at a glance I have no reason to believe it's JS specific.

org.http4s.headers.KeepAliveSuite:
failing seed for header.header does not match arbitrary name is hJyBbXICp5OwOcoOzsaBHYTzIF9y5zo3pHoSs3oX0gO=
==> X org.http4s.headers.KeepAliveSuite.Keep-Alive: header.header does not match arbitrary name 0.09s munit.FailException: Failing seed: UjCaqEjILdSnoSjRhoICQxtFpTAoxvYsTBQfsngpQhG=
You can reproduce this failure by adding the following override to your suite:

  override val scalaCheckInitialSeed = "UjCaqEjILdSnoSjRhoICQxtFpTAoxvYsTBQfsngpQhG="

Exception raised on property evaluation.
> Exception: org.http4s.ParseFailure: Invalid Keep-Alive header: Reserved token of list List(token, max) was found in the extensions.

armanbilge avatar Sep 15 '22 17:09 armanbilge

Another, from a JVM run. Did something change recently affecting this?

==> X org.http4s.headers.KeepAliveSuite.Keep-Alive: header.parse(a.value) == right(a)"  0.072s munit.FailException: Failing seed: uspBgDvsXmf7d1xthWKB6ys_YsaM_2sY5SwH_N4U0DM=
You can reproduce this failure by adding the following override to your suite:

  override val scalaCheckInitialSeed = "uspBgDvsXmf7d1xthWKB6ys_YsaM_2sY5SwH_N4U0DM="

Exception raised on property evaluation.
> Exception: org.http4s.ParseFailure: Invalid Keep-Alive header: Reserved token of list List(token, max) was found in the extensions.
    at munit.ScalaCheckSuite.propToTry(ScalaCheckSuite.scala:98)

armanbilge avatar Sep 20 '22 07:09 armanbilge

I'm not that sure about this variant, but could it be caused by the ScalaCheck update?

danicheg avatar Sep 20 '22 08:09 danicheg

That's what I thought too, but I think I reported this before merging https://github.com/http4s/http4s/pull/6686. Should have noted the failing hash, let me see if I can find it.

armanbilge avatar Sep 20 '22 08:09 armanbilge

I found it. The original failure was in https://github.com/http4s/http4s/commit/13e5826b13b76cff5990b53c5862658176cd4c56 which was still using scalacheck v1.16.0.

armanbilge avatar Sep 20 '22 08:09 armanbilge

@armanbilge @danicheg after a quick check looks like a possible fix could be in the PR. Would that be acceptable?

FrancescoSerra avatar Sep 23 '22 17:09 FrancescoSerra

@FrancescoSerra it would be great 👍🏻

danicheg avatar Sep 23 '22 18:09 danicheg