LLRC: Test for warnings behavior#34143
Merged
nik9000 merged 3 commits intoelastic:masterfrom Oct 6, 2018
Merged
Conversation
Add tests for the Low Level REST Client's strict deprecation hangling. Relates to elastic#33708
Collaborator
|
Pinging @elastic/es-core-infra |
nik9000
commented
Sep 28, 2018
| if (matcher.matches()) { | ||
| warnings.add(matcher.group(1)); | ||
| continue; | ||
| } else { |
Member
Author
There was a problem hiding this comment.
I flipped this around because it lines up a bit better with the rest of our style.
javanna
approved these changes
Oct 2, 2018
| * Emulates Elasticsearch's DeprecationLogger.formatWarning in simple | ||
| * cases. We don't have that available because we're testing against 1.7. | ||
| */ | ||
| private String formatWarning(String warningBody) { |
| if (strictDeprecationMode) { | ||
| try { | ||
| restClient.performRequest(request); | ||
| fail("expected ResponseException"); |
Contributor
There was a problem hiding this comment.
maybe clarify that we expect an exception due to a warning as strict deprecation mode is enabled?
|
|
||
| } | ||
|
|
||
| private void deprecationWarningTest(List<String> warningHeaderTexts, List<String> warningBodyTexts) throws IOException { |
Contributor
There was a problem hiding this comment.
maybe this can be static too, and I would rename to assertDeprecationWarnings or expectDeprecationWarnings
hub-cap
approved these changes
Oct 2, 2018
nik9000
added a commit
that referenced
this pull request
Oct 6, 2018
Add tests for the Low Level REST Client's strict deprecation handling. Relates to #33708
kcm
pushed a commit
that referenced
this pull request
Oct 30, 2018
Add tests for the Low Level REST Client's strict deprecation handling. Relates to #33708
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.
Add tests for the Low Level REST Client's strict deprecation hangling.
Relates to #33708