# Logstash plugins unit tests

**URL:** <https://discuss.elastic.co/t/logstash-plugins-unit-tests/327686>\
**Category:** Logstash\
**Created:** [March 14, 2023, 3:43pm UTC](https://discuss.elastic.co/t/logstash-plugins-unit-tests/327686 "2023-03-14T15:43:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mabourgeot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mabourgeot/32/118469_2.png) [@mabourgeot](https://discuss.elastic.co/u/mabourgeot)\
**Post date:** [March 14, 2023, 3:43pm UTC](https://discuss.elastic.co/t/logstash-plugins-unit-tests/327686/1 "2023-03-14T15:43:26Z")

</div>

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](https://github.com/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

```auto
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 !

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 11, 2023, 3:43pm UTC](https://discuss.elastic.co/t/logstash-plugins-unit-tests/327686/2 "2023-04-11T15:43:50Z")

</div>

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