Skip to content

Conversation

@nik9000
Copy link
Member

@nik9000 nik9000 commented Dec 10, 2016

Starts to centralize creation of the XContentParser in
protected final methods on ESTestCase. The idea is to enable
adding NamedXContentRegistry relatively easily by giving tests
a single place they can override to define the
NamedXContentRegistry. Since NamedXContentRegistry doesn't
exist yet neither does the override point.

This doesn't attempt to migrate all the tests to calling the
new methods to build the parsers. I wanted to make this so we
could review the concept and then I'll merge a followup to
migrate the tests.

Starts to centralize creation of the `XContentParser` in
`protected final` methods on `ESTestCase`. The idea is to enable
adding `NamedXContentRegistry` relatively easily by giving tests
a single place they can override to define the
`NamedXContentRegistry`. Since `NamedXContentRegistry` doesn't
exist yet neither does the override point.

This doesn't attempt to migrate all the tests to calling the
new methods to build the parsers. I wanted to make this so we
could review the concept and then I'll merge a followup to
migrate the tests.
@nik9000 nik9000 added review >test Issues or PRs that are addressing/adding tests v5.2.0 v6.0.0-alpha1 labels Dec 10, 2016
@nik9000 nik9000 requested a review from rjernst December 10, 2016 16:22
@nik9000
Copy link
Member Author

nik9000 commented Dec 10, 2016

@rjernst, I think this is the last precursor to #22003.

Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

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

LGTM

@nik9000 nik9000 merged commit ce86405 into elastic:master Dec 13, 2016
@nik9000
Copy link
Member Author

nik9000 commented Dec 13, 2016

Thanks for reviewing @martijnvg!

master: ce86405
5.x: c0278fe

nik9000 added a commit that referenced this pull request Dec 13, 2016
Starts to centralize creation of the `XContentParser` in
`protected final` methods on `ESTestCase`. The idea is to enable
adding `NamedXContentRegistry` relatively easily by giving tests
a single place they can override to define the
`NamedXContentRegistry`. Since `NamedXContentRegistry` doesn't
exist yet neither does the override point.

This doesn't attempt to migrate all the tests to calling the
new methods to build the parsers. I wanted to make this so we
could review the concept and then I'll merge a followup to
migrate the tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>test Issues or PRs that are addressing/adding tests v5.2.0 v6.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants