Add new base test case for chunked xcontent types #90707
Add new base test case for chunked xcontent types #90707original-brownbear merged 5 commits intoelastic:mainfrom original-brownbear:just-test-changes
Conversation
Making sure that none of the chunked implementations also implement `toXContent`. Added some utilities for working with chunked xcontent that mirror xcontent utilities to keep the changeset as quiet as possible. No big production code changes here, this mostly affects test code paths.
|
Pinging @elastic/es-distributed (Team:Distributed) |
henningandersen
left a comment
There was a problem hiding this comment.
LGTM.
I do wonder if we could have done this as a more pure refactoring effort, would be simpler to review. But good to go...
| import java.util.function.Predicate; | ||
|
|
||
| public class GetSettingsResponseTests extends AbstractSerializingTestCase<GetSettingsResponse> { | ||
| public class GetSettingsResponseTests extends AbstractChunkedSerializingTestCase<GetSettingsResponse> { |
There was a problem hiding this comment.
I wonder if this (and other chunked tests) could have not used AbstractXContentSerializingTestCase in this PR instead and thus made this into a more pure refactoring PR?
There was a problem hiding this comment.
Yea I had that same thought when extracting stuff. But in the end I figured I'd be merging dead code then because the chunked version wouldn't have been used anywhere which felt wrong in a different dimension.
There was a problem hiding this comment.
Could we have left out the chunked version and just introduced the new abstract test class and the xcontent specific one?
There was a problem hiding this comment.
🤦 right that would've made more sense. Sorry, was a little quick there.
|
Thanks Henning! |
* main: (150 commits) Remove ToXContent interface from ChunkedToXContent (elastic#90409) Remove extra SearchService constructor (elastic#90733) Update min version for the diagnosis yaml test (elastic#90731) Use the AggTestConfig object in testCase (elastic#90699) [DOCS] Add links to clear trained model deployment cache API (elastic#90727) Assert wildcards are not expanded as specified by request options (elastic#90641) [TEST] Fix exit snapshot restore exit condition (elastic#90696) [TEST] Change to atomic file contents save (elastic#90695) Update forbiddenapis to 3.4 (elastic#90624) [Tests] Don't use concurrent search in scripted field type tests (elastic#90712) [ML] Move scaling is possible check for starting trained model (elastic#90706) Add new base test case for chunked xcontent types (elastic#90707) Fix testRedNoBlockedIndicesAndRedAllRoleNodes (elastic#90671) Fix nullpointer in docs test setup (elastic#90660) Don't produce build logs artifact when in a composite build Fixing a race condition in EnrichCoordinatorProxyAction that can leave an item stuck in its queue (elastic#90688) docs: update fleet/agent pipeline docs (elastic#90659) [HealthAPI] Use plural consistently in resource types (elastic#90682) [Testing] Enable bwc and fix sorting for 500_date_range (elastic#90681) Add profiling and documentation for dfs phase (elastic#90536) ... # Conflicts: # x-pack/plugin/mapper-aggregate-metric/src/test/java/org/elasticsearch/xpack/aggregatemetric/mapper/AggregateDoubleMetricFieldMapperTests.java
in elastic#90707 a org.elasticsearch.test.AbstractSerializingTestCase was refactored and AbstractXContentSerializingTestCase should be used instead.
in #90707 a org.elasticsearch.test.AbstractSerializingTestCase was refactored and AbstractXContentSerializingTestCase should be used instead.
Extracted only test changes for moving to a new base test class from #90409 (+ one utility in prod code).