Skip to content

Conversation

@benchaplin
Copy link
Contributor

Bit of a facepalm moment here: I wrote these tests and they aren't doing ANYTHING.

The ErrorTraceHelper methods work by adding request handling behavior that deconstructs a batched query response (NodeQueryResponse) and checks whether exceptions have stack traces or not. This behavior must be in place before the search request is made. I had put them after, meaning the assertions were never executed.

This PR makes that change: adding the handling before the search request is made. I changed the method names from "assert" -> "expect" to better describe this proper usage.

@benchaplin benchaplin added >test Issues or PRs that are addressing/adding tests auto-backport Automatically create backport pull requests when merged Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch :Search Foundations/Search Catch all for Search Foundations branch:9.2 labels Oct 24, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

throw new UncheckedIOException(e);
} finally {
// Always forward to the original channel
channel.sendResponse(response);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moving these into the finally block so that AssertionErrors don't stop execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch >test Issues or PRs that are addressing/adding tests v9.2.1 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants