Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor, add tests, upgrade http4s #2

Merged
merged 8 commits into from
Nov 16, 2021
Merged

Refactor, add tests, upgrade http4s #2

merged 8 commits into from
Nov 16, 2021

Conversation

slve
Copy link
Owner

@slve slve commented Feb 14, 2021

Added MagicNumber* tests to represent the behavior in my local environment.
These tests all tend to pass, while some that titled with "Tends to..." fail sometimes.

On the other hand Http4sClientsSuite and SoftwareMillClientsSuite represent expected behavior,
they pass on small-, while fail on larger request payload sizes.

@slve slve self-assigned this Feb 14, 2021
@slve slve changed the title Factor out common code to Server and package object Upgrade scalatest, disable parallel run Add tests, move existing manual debugging there too Upgrade http4s to 0.21.19 Refactor, add tests, upgrade http4s Feb 14, 2021
Comment on lines +10 to +28
// Numbers below may vary on different computers
object blaze {
val magicRequestPayloadSize = 65398
val magicResponsePayloadSize = 81161
}

object ember {
val magicRequestPayloadSize = 65337
}

object jdkhttp {
val magicRequestPayloadSize = 8 * 65416 + 1 // 523329
val magicResponsePayloadSize = 8 * 8177 + 1 // 65417
}

object sttp {
val magicRequestPayloadSize = 65289
val magicResponsePayloadSize = 81161
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note these magic numbers.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @slve

val magicRequestPayloadSize = 65398 this is 65535 - default request headers length number, I suspect it is true for other clients

@slve slve requested a review from rossabaker February 15, 2021 09:45
@rossabaker
Copy link
Collaborator

Just dropping a note that I'm not ignoring this, just busier than expected. I appreciate the effort hunting this down, and will get to it ASAP.

@slve
Copy link
Owner Author

slve commented Feb 16, 2021

Hi Ross, no problem at all, I can fully understand that. Thanks for the update.

@slve slve merged commit 923fc15 into master Nov 16, 2021
@slve slve deleted the refactor-and-add-tests branch November 16, 2021 10:02
@rossabaker
Copy link
Collaborator

I'm so sorry. I lost all track of this. Are there still flaky tests here, or have we indirectly fixed this?

val uri = uri"http://localhost:8099"
val body = "x" * requestPayloadSize
val req = Request[IO](POST, uri).withEntity(body)
val response = "x" * responsePayloadSize
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to put here z for example, to distinguish request/response bytes in debugger.

@eugene-cheverda
Copy link
Collaborator

eugene-cheverda commented Nov 23, 2021

I'm so sorry. I lost all track of this. Are there still flaky tests here, or have we indirectly fixed this?

Hi @rossabaker it is still reproducible on both 0.21.x and 0.22.x.

@slve
Copy link
Owner Author

slve commented Nov 24, 2021

Hi @rossabaker, completely understandable, no problem at all :)
Unfortunately the issue still exist,
huge thanks to @eugene-cheverda for following up on this one
here, as well as at http4s/blaze#637

@eugene-cheverda unfortunately I won't have much time this year to
follow up on details or doing further investigation,
on the other hand I really appreciate your time and effort you already put into this topic. 🍻
I've invited you to be a collaborator please feel free to handle this repository,
making all the necessary changes that can help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants