Updated README to document how to run single Ruby specs

Fixes #11536
This commit is contained in:
andsel 2020-01-24 12:40:31 +01:00 committed by Andrea Selva
parent ca89cfee75
commit 23c7f48aad

View file

@ -184,6 +184,14 @@ Most of the unit tests in Logstash are written using [rspec](http://rspec.info/)
./gradlew check ./gradlew check
4- To execute a single Ruby test run:
SPEC_OPTS="-fd -P logstash-core/spec/logstash/api/commands/default_metadata_spec.rb" ./gradlew :logstash-core:rubyTests --tests org.logstash.RSpecTests
5- To execute single spec for integration test, run:
./gradlew integrationTests -PrubyIntegrationSpecs=specs/slowlog_spec.rb
Sometimes you might find a change to a piece of Logstash code causes a test to hang. These can be hard to debug. Sometimes you might find a change to a piece of Logstash code causes a test to hang. These can be hard to debug.
If you set `LS_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"` you can connect to a running Logstash with your IDEs debugger which can be a great way of finding the issue. If you set `LS_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"` you can connect to a running Logstash with your IDEs debugger which can be a great way of finding the issue.