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

flaky SttpRestCallTest "too large binary request" #1326

Open
halotukozak opened this issue Mar 3, 2025 · 1 comment
Open

flaky SttpRestCallTest "too large binary request" #1326

halotukozak opened this issue Mar 3, 2025 · 1 comment
Assignees

Comments

@halotukozak
Copy link
Member

SttpRestCallTest "too large binary request" is flaky. Fix made in #1313 is not valid, because the server behaves as espected. A solution should contain the client-side fix

@halotukozak
Copy link
Member Author

Modify the SttpRestCallTest to reproduce the bug

class SttpRestCallTest extends SttpClientRestTest with RestApiTestScenarios {
  test("too large binary request") {
    var i = 0
    while (true) {
      println("i: " + i)
      i += 1
      val future = proxy.binaryEcho(Array.fill[Byte](maxPayloadSize + 1)(5))
      val exception: HttpErrorException = future.failed.futureValue.asInstanceOf[HttpErrorException]
      assert(exception == HttpErrorException.plain(413, "Payload is larger than maximum 1048576 bytes (1048577)"))
    }
  }
}

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

No branches or pull requests

1 participant