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

Unleash / unleash-client-java / 499
89%

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

pending completion
499

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

Jobs
ID Job ID Ran Files Coverage
1 499.1 13 Mar 2020 09:05PM UTC 0
92.6
Travis Job 499.1
Source Files on build 499
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #499
  • 1e3f1dd7 on github
  • Prev Build on master (#497)
  • Next Build on master (#501)
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