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

valkyrjaio / valkyrja-java / 30594384896
100%

Build:
DEFAULT BRANCH: 26.x
Ran 31 Jul 2026 12:44AM UTC
Jobs 1
Files 670
Run time 2min
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

31 Jul 2026 12:43AM UTC coverage: 100.0%. Remained the same
30594384896

push

github

web-flow
[Grpc] fix: Park the outbound writer instead of discarding a wait result (#85)

# Description

Follow-up to #82, which added the gRPC outbound flow-control gate. That
gate held the writing thread
on a `Condition` with a bounded timeout, and discarded the `boolean` the
timed `await` returns.
Discarding it was deliberate — whether the wait was signaled or timed
out tells the gate nothing,
because the loop re-reads `ServerCall.isReady()`, which is the
transport's own authoritative answer
either way. #82 recorded that reasoning as a narrow SpotBugs exclusion.

Suppressing it was the wrong call. SonarCloud flagged the same line
independently as `java:S899` and
classifies it as a reliability **bug**, so the quality gate went red on
the merged change. Two
analyzers reaching for the same line is a signal to restructure the
code, not to add a second
suppression next to the first.

So the gate now parks the writer directly instead of waiting on a
condition variable:

- `LockSupport.parkNanos` / `LockSupport.unpark` both return `void`, so
there is no status value to
discard and nothing for either analyzer to flag. The primitive also
states the intent more
plainly than a condition variable did — the gate holds one thread until
the transport is writable
or a bounded interval elapses, which is exactly what park/unpark is for.
It needs no lock, so the
  `ReentrantLock` and its `Condition` are gone.
- The parked writer is published through an `AtomicReference<@Nullable
Thread>` that `signal()`
reads to unpark it. A plain `volatile Thread` field would work, but
Sonar's `S3077` flags
`volatile` on a non-primitive field and prescribes exactly this;
`AtomicReference` is also already
  the idiom used for cross-thread publication in `WorkerGrpc`.

Behavior is unchanged. Each park is still bounded, so a signal that
races the park costs one
interval rather than stranding the writer, and the loop still re-reads
the transport regardless of
why the park ended — which is what ke... (continued)

1925 of 1925 branches covered (100.0%)

Branch coverage included in aggregate %.

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

7038 of 7038 relevant lines covered (100.0%)

4.33 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30594384896.1 31 Jul 2026 12:44AM UTC 670
100.0
GitHub Action Run
Source Files on build 30594384896
  • Tree
  • List 670
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30594384896
  • df2670fc on github
  • Prev Build on 26.x (#30593700688)
  • Next Build on 26.x (#30613110124)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc