Skip to content

Backport PR #16959 to 8.17: [Backport 8.x] Reimplement LogStash::String setting in Java (#16576)#16960

Merged
andsel merged 1 commit into8.17from
backport_16959_8.17
Jan 27, 2025
Merged

Backport PR #16959 to 8.17: [Backport 8.x] Reimplement LogStash::String setting in Java (#16576)#16960
andsel merged 1 commit into8.17from
backport_16959_8.17

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Backport PR #16959 to 8.17 branch, original message:


Cherry-picked from commit 03b11e9

Non clean backport of #16576

The main differences with main are:

  • missed rename of setting due to Logtash modules code removal in main 179e2ef
  • use of log4j spy instead of mocking log on removed code: 9ad3e95

…16959)

Non clean backport of #16576

----

Reimplements `LogStash::Setting::String` Ruby setting class into the `org.logstash.settings.SettingString` and exposes it through `java_import` as `LogStash::Setting::SettingString`.
Updates the rspec tests in two ways:
- logging mock is now converted to real Log4J appender that spy log line that are later verified
- verifies `java.lang.IllegalArgumentException` instead of `ArgumentError` is thrown because the kind of exception thrown by Java code, during verification.

* Fixed the rename of NullableString to SettingNullableString

* Fixed runner test to use real spy logger from Java Settings instead of mock test double

(cherry picked from commit a0378c0)
@elastic-sonarqube
Copy link
Copy Markdown

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

@andsel andsel merged commit 3897b71 into 8.17 Jan 27, 2025
@andsel andsel deleted the backport_16959_8.17 branch January 27, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants