Logstash plugins unit tests

Hi there !

I'm very new to JRuby unit tests and I'm struggling a bit to run existing unit tests in GitHub - logstash-plugins/logstash-integration-aws.

I've opened a PR to add a feature and would like to add some tests to validate my change, but first I'd like to have the existing ones passing.

I'm running Ubuntu 22.04
I have jruby 9.3.10.0 (2.6.8) installed
I have rspec bundler rake gems installed (using sudo gem install)
jruby -S bundle install says Bundle complete! 8 Gemfile dependencies, 82 gems now installed.

but jruby -S bundle exec rspec fails with

LoadError:
  load error: jopenssl/load -- java.lang.NoClassDefFoundError: org/jruby/util/io/FileExistsException
# ./vendor/bundle/jruby/2.6.0/gems/jruby-openssl-0.9.19-java/lib/openssl.rb:1:in `<main>'
# ./vendor/bundle/jruby/2.6.0/gems/logstash-core-5.6.4-java/lib/logstash/patches/stronger_openssl_defaults.rb:2:in `<main>'
# ./vendor/bundle/jruby/2.6.0/gems/logstash-core-5.6.4-java/lib/logstash/patches.rb:5:in `<main>'
# ./vendor/bundle/jruby/2.6.0/gems/logstash-core-5.6.4-java/lib/logstash/environment.rb:186:in `<main>'
# ./vendor/bundle/jruby/2.6.0/gems/logstash-devutils-1.3.6-java/lib/logstash/devutils/rspec/spec_helper.rb:17:in `<main>'
# ./spec/spec_helper.rb:3:in `<main>'
# ------------------
# --- Caused by: ---
# Java::JavaLang::ClassNotFoundException:
#   org.jruby.util.io.FileExistsException
#   java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
No examples found.

Does anyone know what I'm doing wrong or missing ?

Thanks !

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.