Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JDK9 module name for metrics-logback #1368

Merged
merged 1 commit into from
Dec 27, 2018
Merged

Conversation

arteam
Copy link
Member

@arteam arteam commented Dec 27, 2018

No description provided.

@arteam arteam merged commit 7a6829f into 4.1-development Dec 27, 2018
arteam added a commit that referenced this pull request Dec 27, 2018
@arteam arteam deleted the logback-module-name branch December 27, 2018 19:03
sleberknight pushed a commit to sleberknight/metrics that referenced this pull request Dec 28, 2018
arteam pushed a commit that referenced this pull request Dec 30, 2018
* Add JDK9 module name for metrics-logback (#1368)

* Add ability to provide a custom Clock to health check ResultBuilder

- Add Clock argument to private HealthCheck.Result constructors
- Use Clock.defaultClock() as the default clock in HealthCheck.Result
- Use the Clock instance to obtain the current time for the timestamp
  in HealthCheck.Result private constructor
- Add a Clock to HealthCheck.ResultBuilder with Clock.defaultClock() as
  the default value
- Add usingClock(Clock) to HealthCheck.ResultBuilder to allow customizing
  the Clock when using the builder to create health check Results
- Add test of ResultBuilder#usingClock in HealthCheckTest
- Update toString test in HealthCheckTest making use of
  ResultBuilder#usingClock so that the timestamp can be included in the
  equality check
- Add a new test of the ResultBuilder#withMessage(String, Object...) method
  in HealthCheckTest (because IntelliJ flagged it as not used)
- Update HealthCheckServletTest to use ResultBuilder#usingClock so that
  the assertions can include the timestamp and check the entire response
  content of the health check

In both HealthCheckTest and HealthCheckServletTest I duplicated the
date/time pattern from HealthCheck.Result, which is not ideal, but is
better than exposing the Result's private Pattern. Unless the pattern
is also made configurable, this seemed like a decent trade-off.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant