-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use the systemd plugin on JRuby (#3079)
* Don't use the systemd plugin on JRuby The systemd integration will fail for JRuby at https://github.com/puma/puma/blob/e3d5794a7ebe47577ced4d4dfdd6a6cc969ded01/lib/puma/sd_notify.rb#L140, because JRuby doesn't support UNIX datagram sockets yet, and won't for a while. See jruby/jruby#6504. So turning it off here, so that JRuby users can integrate with systemd on their own if they wish without errors. * Improved skipping systemd for JRuby Added a comment to explain the situation, and used Puma's JRuby detection method instead of re-coding it. * test that systemd plugin isn't loaded on JRuby * rename to test_plugin_systemd_jruby.rb, fix lint * rename test to test_systemd_plugin_not_loaded * make and use skip_unless :linux
- Loading branch information
1 parent
a61b078
commit 0fd1cc5
Showing
5 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require_relative "helper" | ||
require_relative "helpers/integration" | ||
|
||
class TestPluginSystemdJruby < TestIntegration | ||
|
||
THREAD_LOG = TRUFFLE ? "{ 0/16 threads, 16 available, 0 backlog }" : | ||
"{ 0/5 threads, 5 available, 0 backlog }" | ||
|
||
def setup | ||
skip_unless :linux | ||
skip_unless :unix | ||
skip_unless_signal_exist? :TERM | ||
skip_unless :jruby | ||
|
||
super | ||
|
||
ENV["NOTIFY_SOCKET"] = "/tmp/doesntmatter" | ||
end | ||
|
||
def test_systemd_plugin_not_loaded | ||
cli_server "test/rackup/hello.ru" | ||
|
||
assert_nil Puma::Plugins.instance_variable_get(:@plugins)["systemd"] | ||
|
||
stop_server | ||
end | ||
end |