Fix maximum_connections limiting test
This commit is contained in:
parent
83d9e8fb09
commit
5cfddf8f65
37
0001-Fix-maximum_connections-limiting-test.patch
Normal file
37
0001-Fix-maximum_connections-limiting-test.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From b7876b29c46fccd711638073a66d9c2ea76af4fe Mon Sep 17 00:00:00 2001
|
||||
From: maminjie <maminjie1@huawei.com>
|
||||
Date: Fri, 19 Mar 2021 14:15:32 +0800
|
||||
Subject: [PATCH] Fix maximum_connections limiting test
|
||||
|
||||
reference to: https://github.com/macournoyer/thin/pull/360
|
||||
---
|
||||
spec/server_spec.rb | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/spec/server_spec.rb b/spec/server_spec.rb
|
||||
index 40747cc..25fb48a 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_connnections = 1_000_000
|
||||
+ @server.maximum_connections = maximum_connnections
|
||||
@server.config
|
||||
- @server.maximum_connections.should < 100_000
|
||||
+ @server.maximum_connections.should <= maximum_connnections
|
||||
end
|
||||
|
||||
it "should default to non-threaded" do
|
||||
@@ -102,4 +103,4 @@ describe Server, "initialization" do
|
||||
Server.should_not_receive(:setup_signals)
|
||||
Server.new(:signals => false)
|
||||
end
|
||||
-end
|
||||
\ No newline at end of file
|
||||
+end
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
%global gem_name thin
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 1.7.2
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: A thin and fast web server
|
||||
License: (GPLv2+ or Ruby) and BSD and MIT
|
||||
URL: https://rubygems.org/gems/%{gem_name}/versions/%{version}
|
||||
@ -10,6 +10,7 @@ Source1: https://github.com/macournoyer/thin/archive/v%{version}.tar
|
||||
# Fix the test suite error due to way Ruby 2.5 reports warnings.
|
||||
# https://github.com/macournoyer/thin/pull/346
|
||||
Patch0: rubygem-thin-1.7.2-Mock-Kernel.warn-in-Ruby-2.5-compatible-way.patch
|
||||
Patch1: 0001-Fix-maximum_connections-limiting-test.patch
|
||||
BuildRequires: ruby(release) rubygems-devel ruby-devel gcc rubygem(rspec2)
|
||||
BuildRequires: rubygem(eventmachine) >= 1.0.4 rubygem(daemons) >= 1.0.9 rubygem(rack) >= 1.0.0
|
||||
%description
|
||||
@ -54,6 +55,7 @@ pushd .%{gem_instdir}
|
||||
tar xzvf %{SOURCE1}
|
||||
cp -r thin-%{version}/spec spec
|
||||
cat %{PATCH0} | patch -p1
|
||||
cat %{PATCH1} | patch -p1
|
||||
find spec/perf -name "*_spec.rb" -exec \
|
||||
sed -i '/be_faster_then/ i \ pending' {} \;
|
||||
sed -i -r "/'should (force )?kill process in pid file'/a \ pending" \
|
||||
@ -82,5 +84,8 @@ popd
|
||||
%{gem_instdir}/Rakefile
|
||||
|
||||
%changelog
|
||||
* Fri Mar 19 2021 maminjie <maminjie1@huawei.com> - 1.7.2-2
|
||||
- Fix maximum_connections limiting test
|
||||
|
||||
* Sat Aug 22 2020 tuShenmei <tushenmei@huawei.com> - 1.7.2-1
|
||||
- package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user