-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add an IngestService stats test #93120
Add an IngestService stats test #93120
Conversation
Push a single document through a default/request and a final pipeline (of one processor apiece) and check the resulting statistics.
Pinging @elastic/es-data-management (Team:Data Management) |
server/src/internalClusterTest/java/org/elasticsearch/ingest/IngestAsyncProcessorIT.java
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/ingest/IngestServiceTests.java
Outdated
Show resolved
Hide resolved
new BytesArray("{\"processors\": [{\"mock\" : {}}]}"), | ||
XContentType.JSON | ||
); | ||
PutPipelineRequest putRequest2 = new PutPipelineRequest( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth including a nested pipeline here? I know you and I have discussed that previously, but I'm not sure whether it actually makes the counters any more complex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a time-boxed swing at it, I do think it's worth adding (assuming it doesn't blow up the size or complexity of the test extraordinarily).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added via 0bc58d2. It's a bit janky, because there's a chicken and egg problem of the mock ingest service needing the processor factory, but the factory needing an ingest service.
I'm game to take a swing at golfing it, though, if you'd like to join up for 10-15 minutes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks reasonable enough to me.
Related to #92843
Expands the scenarios under test, leaving the failing test assertion commented out. A PR that fixes the bug will be able to remove the comment.
Note: it's a bit odd to add a failing test like this, but I'm working up to something -- I think it'll be easier for everyone if we add the test this way so that I can drop the comment later.