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

Test: Enable strict deprecation on all tests #36558

Merged
merged 4 commits into from
Jan 30, 2019

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Dec 12, 2018

This drops the option for tests to disable strict deprecation mode in
the low level rest client in favor of configuring expected warnings on
any calls that should expect warnings. This behavior is
paranoid-by-default which is generally the right way to handle
deprecations and tests in general.

This drops the option for tests to disable strict deprecation mode in
the low level rest client in favor of configuring expected warnings on
any calls that should expect warnings. This behavior is
paranoid-by-default which is generally the right way to handle
deprecations and tests in general.
@nik9000 nik9000 added :Delivery/Build Build or test infrastructure v7.0.0 v6.6.0 labels Dec 12, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@nik9000 nik9000 added the >test Issues or PRs that are addressing/adding tests label Dec 12, 2018
Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nik9000, I left some minor comments.

Request request = new Request("HEAD", url);
for (Map.Entry<String, String> param : params.entrySet()) {
request.addParameter(param.getKey(), param.getValue());
}
request.setOptions(expectVersionSpecificWarnings(w -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In #36511 I added expectWarnings, which is syntactic sugar for this call. It might be nice to switch to that when it merges (should be very soon).

headTestCase("/test/test/1", emptyMap(), greaterThan(0));
headTestCase("/test/test/1", singletonMap("pretty", "true"), greaterThan(0));
headTestCase("/test/test/2", emptyMap(), NOT_FOUND.getStatus(), greaterThan(0));
headTestCase("/test/test/1", emptyMap(), OK.getStatus(), greaterThan(0),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could switch to the _doc type in this test, so that we don't need to check deprecation warnings for get requests. The main purpose of the tests is to check how HEAD is handled, and not verify deprecation warnings (we do that in other places), so it could be nice to bring the test in line with the new API.

@jasontedor jasontedor added v6.7.0 and removed v6.6.0 labels Dec 19, 2018
@nik9000 nik9000 removed the v6.7.0 label Jan 30, 2019
@nik9000
Copy link
Member Author

nik9000 commented Jan 30, 2019

@jtibshirani, sorry for the long delay! Could you have another look at this?

@nik9000
Copy link
Member Author

nik9000 commented Jan 30, 2019

@elasticmachine, run elasticsearch-ci/docs-check

@nik9000
Copy link
Member Author

nik9000 commented Jan 30, 2019

@elasticmachine, run elasticsearch-ci/docbldesx

Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@nik9000 nik9000 merged commit e977182 into elastic:master Jan 30, 2019
@nik9000
Copy link
Member Author

nik9000 commented Jan 30, 2019

Thanks for reviewing @jtibshirani!

jasontedor added a commit to dnhatn/elasticsearch that referenced this pull request Jan 30, 2019
* master:
  Expose retention leases in shard stats (elastic#37991)
  Make primary terms fields private in index shard (elastic#38036)
  ML: Add reason field in JobTaskState (elastic#38029)
  Log flush_stats and commit_stats in testMaybeFlush
  HLRC: Fix strict setting exception handling (elastic#37247)
  Test: Enable strict deprecation on all tests (elastic#36558)
  Removes typed calls from YAML REST tests (elastic#37611)
  Switch default time format for ingest from Joda to Java for v7 (elastic#37934)
  Remove deprecated Plugin#onModule extension points (elastic#37866)
  Geo: Fix Empty Geometry Collection Handling (elastic#37978)
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team >test Issues or PRs that are addressing/adding tests v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants