-
Notifications
You must be signed in to change notification settings - Fork 25.3k
INGEST: Tests for Drop Processor #33430
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
INGEST: Tests for Drop Processor #33430
Conversation
* UT for behavior of dropped callback and drop processor * Moved drop processor to `server` project to enable this test * Simple IT * Relates elastic#32278
Pinging @elastic/es-core-infra |
@rjernst can you take a look here? :) I think we should at least have some basic tests for this. |
public void testExecuteWithDrop() { | ||
IngestService ingestService = createWithProcessors(Collections.singletonMap("drop", new DropProcessor.Factory())); | ||
PutPipelineRequest putRequest = new PutPipelineRequest("_id", | ||
new BytesArray("{\"processors\": [{\"drop\" : {}}]}"), XContentType.JSON); |
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.
minor: you may also want a second (mock) processor here, and assert that the second processor never executes.
LGTM, one minor optional suggestion. |
@jakelandis thanks! Suggestion applied :) |
* INGEST: Tests for Drop Processor * UT for behavior of dropped callback and drop processor * Moved drop processor to `server` project to enable this test * Simple IT * Relates elastic#32278
* INGEST: Tests for Drop Processor * UT for behavior of dropped callback and drop processor * Moved drop processor to `server` project to enable this test * Simple IT * Relates #32278
* INGEST: Tests for Drop Processor * UT for behavior of dropped callback and drop processor * Moved drop processor to `server` project to enable this test * Simple IT * Relates #32278
and drop processor
server
project to enable this test (otherwise I would've had to add code for a dummy processor that returnsnull
in the server tests for testing the callback ... moving the proc seemed more reasonable :))