The GitHub Actions job "Validate and test" on pekko-http.git/main has succeeded.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
e2a4aea439094bdeda4bcefb14a79131061708ee / PJ Fanning 
<[email protected]>
fix: pull pending response when toNet is pulled during termination (#1400)

* fix: pull pending response when toNet is pulled during termination

Motivation:
During termination, the toNet handler only pulls fromUser if an element is
already available, which is effectively never. If toNet is pulled after
termination started, the handler's response is not read. The connection stalls
until the hard deadline and is then failed, so the response is lost.

Modification:
Pull fromUser unless it has already been pulled.

Result:
A response for an in-flight request is delivered with Connection: close, even
if the network side only pulls after termination started.

Tests:
- sbt "http-core / Test / testOnly 
org.apache.pekko.http.scaladsl.GracefulTerminationSpec":
  new test failed before the fix (Expected OnNext(_), yet no element signaled
  during 3 seconds), and the spec passes with it (11 succeeded, 1 already 
ignored)
- sbt "http-core / scalafmtCheck" "http-core / Test / scalafmtCheck": passed
- git diff --check: passed
- MiMa not run locally: no public API or binary shape change

References:
None - found while looking at #1397

* test: assert the connection termination future in the late pull spec

Motivation:
The spec ignored the future returned by terminate, so it would not notice
the termination of the connection failing or never completing.

Modification:
Assert that the future completes with HttpConnectionTerminated.

Result:
The spec also covers the completion of the termination future.

Tests:
- sbt "http-core / Test / testOnly 
org.apache.pekko.http.scaladsl.GracefulTerminationSpec":
  passed (11 succeeded, 1 already ignored)
- sbt "http-core / Test / scalafmtCheck": passed
- git diff --check: passed

References:
Review comment on #1400

Report URL: https://github.com/apache/pekko-http/actions/runs/42136919196

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to