From 305e70c623f6e051e1552a1e1caa5e8d96eea516 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 23 Jan 2020 12:10:20 +0100
Subject: [PATCH] Fix maximum_connections limiting test.
This test recently started to fail on Fedora. I suspect that either that
either Kernel or systemd increased RLIMIT_NOFILE by default to 512k.
There should probably be additional logic, which would initialize the
maximum_connections variable I refactored. `prlimit` can display the
actual value.
---
spec/server_spec.rb | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/spec/server_spec.rb b/spec/server_spec.rb
index 40747cc..1c5b2ee 100644
--- a/spec/server_spec.rb
+++ b/spec/server_spec.rb
@@ -16,9 +16,10 @@ describe Server do
# connections, so we cannot really run this test under that
# condition.
pending("only for non-root users") if Process.euid == 0
- @server.maximum_connections = 100_000
+ maximum_connections = 1_000_000
+ @server.maximum_connections = maximum_connections
@server.config
- @server.maximum_connections.should < 100_000
+ @server.maximum_connections.should < maximum_connections
end
it "should default to non-threaded" do
--
2.25.0