Format Watcher.status.lastChecked and lastMetCondition#38626
Merged
pgomulka merged 6 commits intoelastic:masterfrom Feb 12, 2019
Merged
Format Watcher.status.lastChecked and lastMetCondition#38626pgomulka merged 6 commits intoelastic:masterfrom
pgomulka merged 6 commits intoelastic:masterfrom
Conversation
Change the formatting for Watcher.status.lastCheck and lastMetCondition to be the same as Watcher.status.state.timestamp. These should all have only millisecond precission
Contributor
Author
|
@elasticmachine run elasticsearch-ci/1 |
jakelandis
reviewed
Feb 11, 2019
| XContentSource source = new XContentSource(getResponse.getSourceAsBytesRef(), XContentType.JSON); | ||
|
|
||
| String lastChecked = source.getValue("status.last_checked"); | ||
| assertThat(lastChecked, WatcherTestUtils.isSameDate(getWatchResponse.getStatus().lastChecked())); |
Contributor
There was a problem hiding this comment.
Can you also assert that the nano seconds are not present here ?
Contributor
Author
There was a problem hiding this comment.
sure - updated the PR
spinscale
reviewed
Feb 12, 2019
| @Override | ||
| protected Boolean featureValueOf(ZonedDateTime actual) { | ||
| //if date has millisecond precision its nanosecond field will be rounded to millis (equal millis * 10^6) | ||
| return actual.getNano() == actual.get(ChronoField.MILLI_OF_SECOND) * 1000_000; |
Contributor
There was a problem hiding this comment.
alternatively just actual.getNano() % 1000 == 0 - not sure if it is more readable to be honest, so feel free to ignore me :-)
pgomulka
added a commit
to pgomulka/elasticsearch
that referenced
this pull request
Feb 12, 2019
Change the formatting for Watcher.status.lastCheck and lastMetCondition to be the same as Watcher.status.state.timestamp. These should all have only millisecond precision closes elastic#38619
pgomulka
added a commit
to pgomulka/elasticsearch
that referenced
this pull request
Feb 12, 2019
Change the formatting for Watcher.status.lastCheck and lastMetCondition to be the same as Watcher.status.state.timestamp. These should all have only millisecond precision closes elastic#38619
pgomulka
added a commit
that referenced
this pull request
Feb 12, 2019
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Feb 13, 2019
* master: Remove _type term filters from cluster alert watches (elastic#38819) Adjust log and unmute testFailOverOnFollower (elastic#38762) Fix line separators in JSON logging tests (elastic#38771) Fix synchronization in LocalCheckpointTracker#contains (elastic#38755) muted test Remove TLSv1.2 pinning in ssl reload tests (elastic#38651) Don't fail init script if `/proc/.../max_map_count` absent (elastic#35933) Format Watcher.status.lastChecked and lastMetCondition (elastic#38626) SQL: Implement `::` cast operator (elastic#38774) Ignore failing test
pgomulka
added a commit
that referenced
this pull request
Feb 13, 2019
Contributor
|
@pgomulka Is this still |
Contributor
Author
|
@gwbrown indeed not needed. Thank you for a remainder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change the formatting for Watcher.status.lastCheck and lastMetCondition
to be the same as Watcher.status.state.timestamp. These should all have
only millisecond precision
closes #38619