You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rubygem-dalli/rubygem-dalli-2.7.6-Fix-mem...

45 lines
1.9 KiB

From 754414d3cd21a385ea62d58307ed7055e1df2996 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Thu, 18 Jan 2018 17:10:50 +0100
Subject: [PATCH] Fix mamcached 1.5.4 compatibility.
memcached 1.5.4 changed order of evaluation of command line parameters
[1]. As a result, the test suite failed with errors such as:
~~~
$ ruby -Ilib:test -e 'Dir.glob('\''./test/test_*.rb'\'').sort.each{ |x| require x }'
Testing with Rails 5.1.4
Using standard socket IO (ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux])
Run options: --seed 35324
# Running:
Found memcached 1.5.4 in PATH
.........................................................Cannot set item size limit higher than 1/2 of memory max.
Cannot set item size limit higher than 1/2 of memory max.
F
Failure:
Dalli::using a live server::in low memory conditions#test_0001_handle error response correctly [/builddir/build/BUILD/dalli-2.7.6/usr/share/gems/gems/dalli-2.7.6/test/test_dalli.rb:740]:
unexpected failure on iteration 0
/usr/share/gems/gems/railties-5.1.4/lib/rails/test_unit/reporter.rb:70:in `method': undefined method `test_0001_handle error response correctly' for class `Minitest::Result' (NameError)
~~~
This commit adjust the memcached parameters to make the test suite pass.
[1] https://github.com/memcached/memcached/commit/95246f7947e9d95969d04db0898a93ef66235fb0
---
test/memcached_mock.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/memcached_mock.rb b/test/memcached_mock.rb
index 47e96cb..42ba9d7 100644
--- a/test/memcached_mock.rb
+++ b/test/memcached_mock.rb
@@ -108,7 +108,7 @@ def memcached_cas_persistent(port = 25662)
def memcached_low_mem_persistent(port = 19128)
- dc = start_and_flush_with_retry(port, '-m 1 -M')
+ dc = start_and_flush_with_retry(port, '-m 1 -M -I 512k')
yield dc, port if block_given?
end