• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mizosoft / methanol / #239 / 1
89%
master: 89%

Build:
DEFAULT BRANCH: master
Ran 29 Apr 2024 03:01PM UTC
Files 135
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Apr 2024 02:53PM UTC coverage: 91.336% (+0.03%) from 91.303%
#239.1

push

github

web-flow
Fix missed response for HttpResponsePublisher (#69)

Because `onResponse(response)` decrements `ongoing` prematurely (before
submitting the response and potentially completing downstream), the last
response passed might be missed when a race happens with
`onInitialResponseBodyCompletion()`. Consider this scenario:

 - `onResponse` & `onInitialResponseBodyCompletion` interleave.
 - `onResponse` acquires the lock first, and decrements `ongoing`. It
   won't perceive initial body completion, so it won't want to complete
   downstream.
 - `onInitialResponseBodyCompletion` acquires the lock later, and perceives
   no ongoing responses, so it proceeds with the intent to complete downstream.
 - `onInitialResponseBodyCompletion` continues, and calls `complete()`, which
   pushes the sentinel to the queue.
 - `onResponse` continues to `submit(response)`, but the response is submitted
   after the sentinel and is hence ignored.

The fix is to not prematurely decrement `ongoing` when the last response is received,
but do so after the response is submitted. This way, `onInitialResponseBodyCompletion`
never perceives a completed stream that is not **really** completed.

6684 of 7318 relevant lines covered (91.34%)

0.91 hits per line

Source Files on job #239.1
  • Tree
  • List 0
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 239
  • c99b77d6 on github
  • Prev Job for on master (##231.1)
  • Next Job for on master (##244.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc