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

mizosoft / methanol / #236
91%
master: 89%

Build:
Build:
LAST BUILD BRANCH: retryer
DEFAULT BRANCH: master
Ran 29 Apr 2024 12:24AM UTC
Jobs 1
Files 135
Run time 1min
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 12:09AM UTC coverage: 91.309% (+0.006%) from 91.303%
#236

Pull #69

github

mizosoft
Fix missed response for HttpResponsePublisher

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.
Pull Request #69: Fix missed response for HttpResponsePublisher

7 of 7 new or added lines in 1 file covered. (100.0%)

6682 of 7318 relevant lines covered (91.31%)

0.91 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #236.1 29 Apr 2024 12:24AM UTC 0
91.31
Source Files on build #236
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #236
  • Pull Request #69
  • PR Base - master (#)
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