logstash-plugins / logstash-input-azure_event_hubs

Logstash input for consuming events from Azure Event Hubs
Apache License 2.0
18 stars 28 forks source link

Replace use of block with lambda to fix wrong number of arguments err… #75

Closed robbavey closed 2 years ago

robbavey commented 2 years ago

…or on jruby-9.3.4.0 on docker

This is a strange one. Running tests on docker, prior to this test, the call to when_complete using a block for the BiConsumer parameter would fail with the following error:

 [2022-06-08T15:31:49,587][ERROR][logstash.inputs.azureeventhubs] Event Hub failed during initialization. {:event_hub_name=>"event_hub_name0", :exception=>#<ArgumentError: wrong number of arguments (given 0, expected 1)>, :backtrace=>["/usr/share/plugins/plugin/lib/logstash/inputs/azure_event_hubs.rb:435:in `block in run'"]}

Running the tests locally, this does not fail on my development machine (MacOsX x86_64), but does fail in the dockerized test environment. Attempting to create a simple reproducer against a BiConsumer also does not fail.

robbavey commented 2 years ago

https://app.travis-ci.com/github/logstash-plugins/logstash-input-azure_event_hubs/jobs/572881450 is an example of a failure

robbavey commented 2 years ago

This is likely due to https://github.com/jruby/jruby/issues/7246