elastic / logstash-devutils

An assortment of tooling/libraries to make Logstash core and plugin development and releasing a bit easier.
Apache License 2.0
17 stars 29 forks source link

Fix: avoid double registering filters in sample helper #88

Closed kares closed 3 years ago

kares commented 3 years ago

This PR changes sample test helper do not explicitly call filter.register. Filter registration is performed by the Java pipeline automatically and this leads to unexpected behavior for plugins that assume 'previous' state in register -> plugin under test behaving differently than within the context of LS.


at least since LS 6.1.0 filters get registered on worker startup: https://github.com/elastic/logstash/blob/v6.1.0/logstash-core/lib/logstash/java_pipeline.rb#L667-L672

devutils requires "logstash-core", ">= 6.3" so it's safe to remove

resolves https://github.com/elastic/logstash-devutils/issues/77