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

ben-manes / caffeine / #2866 / 1
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 22 Mar 2022 04:05AM UTC
Files 74
Run time 5s
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

21 Mar 2022 10:42PM UTC coverage: 94.91% (+0.8%) from 94.13%
#2866.1

push

github-actions

ben-manes
Add tests for thread interruption

When a cache is interrupted by the CacheLoader, it sets the thread flag
and wraps the InterruptedException for a runtime throw. This matches
Guava's behavior so that status is communicated without having the
checked exception in the interface contract. Neither cache apply this
rule when the mapping function is provided since the caller had to
handle the interruption themselves to bubble it up as a runtime
failure.

This applies to an async cache if interrupted while obtaining the
future. If the thread computing the future is interrupted then that
is merely the failure reason, but the consumer is not interrupted.

Interruption can occur silently when performing a refreshAfterWrite's
reload. This too sets the flag, but does not throw an exception as
documented that reload failures are logged and suppressed. The caller
can still check its interruption status, e.g. to halt its processing
in classic threaded logic.

Generally we don't recommend using interruption as a means of
communicating cancelation as a confusing, error prone, and not widely
used mechanism. Likely virtual threads will promote a better approach,
or at least evangulize interruption so that developers understand how
to use it properly.

6675 of 7033 relevant lines covered (94.91%)

0.95 hits per line

Source Files on job #2866.1
  • Tree
  • List 0
  • Changed 9
  • Source Changed 5
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2866
  • e1119b96 on github
  • Prev Job for on master (##2859.1)
  • Next Job for on master (##2867.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