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

Unleash / unleash-client-java / 499 / 1
89%
master: 89%

Build:
DEFAULT BRANCH: master
Ran 13 Mar 2020 09:05PM UTC
Files 56
Run time 10s
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

13 Mar 2020 09:02PM UTC coverage: 92.604% (-0.4%) from 92.977%
499.1

push

travis-ci

web-flow
fix: add `shutdown()` to `Unleash` (#103)

This PR introduces a new `shutdown()` method to 2 interfaces, `Unleash` and `UnleashScheduledExecutor`

In order to properly shutdown a server that's running an Unleash client, all scheduled threads should be shutdown gracefully.

With the current implementation there is no clean way to shutdown the `UnleashScheduledExecutor`. If we're using the default implementation of `UnleashScheduledExecutorImpl`, all fields that would allow us to do so are either private, or are swallowed; The `ScheduledFuture` object returned from `setInterval` is not set to any field in the 2 constructors that call it, `UnleashMetricServiceImpl` and `FeatureToggleRepository`. Nor is the `ScheduledThreadPoolExecutor` exposed (it has a `shutdown()` method).

Our only option right now is to implement our own `UnleashScheduledExecutor`, pass it in as the config, and have a `close()` or `shutdown()` method on it. (we can't even use `UnleashScheduledExecutorImpl` because of the private fields.

The implementation gets the executor from the `config` instance and call `shutdown()` on it. That way, no matter which implementation of `UnleashScheduledExecutor` one would use, they can shut it down via the main interface.

889 of 960 relevant lines covered (92.6%)

0.93 hits per line

Source Files on job 499.1
  • Tree
  • List 0
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 461
  • Travis Job 499.1
  • 1e3f1dd7 on github
  • Prev Job for on master (#497.1)
  • Next Job for on master (#501.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