Compare commits
No commits in common. 'epel9' and 'i9' have entirely different histories.
@ -1,2 +0,0 @@
|
||||
/dalli-*.gem
|
||||
/dalli-*-tests.txz
|
Binary file not shown.
Binary file not shown.
@ -1,44 +0,0 @@
|
||||
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
|
||||
|
@ -1,125 +0,0 @@
|
||||
From 6d3243e7f41166b9fe57a64df066b1d1ec27164c Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Valena <pvalena@redhat.com>
|
||||
Date: Tue, 22 Aug 2017 13:42:43 +0200
|
||||
Subject: [PATCH] Use `assert_nil` in tests
|
||||
|
||||
instead of `assert_equal nil`, because it produces errors with activesupport >= 5.1.3.
|
||||
---
|
||||
test/test_active_support.rb | 16 ++++++++--------
|
||||
test/test_dalli.rb | 8 ++++----
|
||||
test/test_encoding.rb | 2 +-
|
||||
3 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/test/test_active_support.rb b/test/test_active_support.rb
|
||||
index eca4322..6313b4c 100644
|
||||
--- a/test/test_active_support.rb
|
||||
+++ b/test/test_active_support.rb
|
||||
@@ -84,7 +84,7 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||
with_cache cache_nils: true do
|
||||
@dalli.write('nil', nil)
|
||||
dvalue = @dalli.fetch('nil') { flunk }
|
||||
- assert_equal nil, dvalue
|
||||
+ assert_nil dvalue
|
||||
end
|
||||
|
||||
with_cache cache_nils: false do
|
||||
@@ -281,7 +281,7 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||
@dalli.delete(y)
|
||||
Dalli::Client.any_instance.expects(:get).with(y, {}).once.returns(nil)
|
||||
dres = @dalli.read(y)
|
||||
- assert_equal nil, dres
|
||||
+ assert_nil dres
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -320,15 +320,15 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||
assert_equal 6, @dalli.increment('counterY1', 1, :initial => 5)
|
||||
assert_equal 6, @dalli.read('counterY1', :raw => true).to_i
|
||||
|
||||
- assert_equal nil, @dalli.increment('counterZ1', 1, :initial => nil)
|
||||
- assert_equal nil, @dalli.read('counterZ1')
|
||||
+ assert_nil @dalli.increment('counterZ1', 1, :initial => nil)
|
||||
+ assert_nil @dalli.read('counterZ1')
|
||||
|
||||
assert_equal 5, @dalli.decrement('counterY2', 1, :initial => 5)
|
||||
assert_equal 4, @dalli.decrement('counterY2', 1, :initial => 5)
|
||||
assert_equal 4, @dalli.read('counterY2', :raw => true).to_i
|
||||
|
||||
- assert_equal nil, @dalli.decrement('counterZ2', 1, :initial => nil)
|
||||
- assert_equal nil, @dalli.read('counterZ2')
|
||||
+ assert_nil @dalli.decrement('counterZ2', 1, :initial => nil)
|
||||
+ assert_nil @dalli.read('counterZ2')
|
||||
|
||||
user = MockUser.new
|
||||
assert op_addset_succeeds(@dalli.write(user, 0, :raw => true))
|
||||
@@ -369,7 +369,7 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||
memcached_kill(new_port)
|
||||
|
||||
silence_logger do
|
||||
- assert_equal @dalli.read('foo'), nil
|
||||
+ assert_nil @dalli.read('foo')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -446,7 +446,7 @@ def self.it_with_and_without_local_cache(message, &block)
|
||||
|
||||
it 'supports connection pooling' do
|
||||
with_cache :expires_in => 1, :namespace => 'foo', :compress => true, :pool_size => 3 do
|
||||
- assert_equal nil, @dalli.read('foo')
|
||||
+ assert_nil @dalli.read('foo')
|
||||
assert @dalli.write('foo', 1)
|
||||
assert_equal 1, @dalli.fetch('foo') { raise 'boom' }
|
||||
assert_equal true, @dalli.dalli.is_a?(ConnectionPool)
|
||||
diff --git a/test/test_dalli.rb b/test/test_dalli.rb
|
||||
index ac404b0..0d36877 100644
|
||||
--- a/test/test_dalli.rb
|
||||
+++ b/test/test_dalli.rb
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
it 'returns nil for nonexist key' do
|
||||
memcached_persistent do |dc|
|
||||
- assert_equal nil, dc.get('notexist')
|
||||
+ assert_nil dc.get('notexist')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
|
||||
dc.set("fetch_key", nil)
|
||||
res = dc.fetch("fetch_key") { flunk "fetch block called" }
|
||||
- assert_equal nil, res
|
||||
+ assert_nil res
|
||||
end
|
||||
|
||||
memcached_persistent(21345, cache_nils: false) do |dc|
|
||||
@@ -507,7 +507,7 @@
|
||||
assert_equal 'bar', dc.get(:foo)
|
||||
|
||||
resp = dc.get('123')
|
||||
- assert_equal nil, resp
|
||||
+ assert_nil resp
|
||||
|
||||
assert op_addset_succeeds(dc.set('123', 'xyz'))
|
||||
|
||||
@@ -561,7 +561,7 @@
|
||||
assert_equal 'bar', dc.get(:foo)
|
||||
|
||||
resp = dc.get('123')
|
||||
- assert_equal nil, resp
|
||||
+ assert_nil resp
|
||||
|
||||
assert op_addset_succeeds(dc.set('123', 'xyz'))
|
||||
|
||||
diff --git a/test/test_encoding.rb b/test/test_encoding.rb
|
||||
index 8f03e4a..7daf874 100644
|
||||
--- a/test/test_encoding.rb
|
||||
+++ b/test/test_encoding.rb
|
||||
@@ -22,7 +22,7 @@
|
||||
assert dc.set(key, 'bar', 1)
|
||||
assert_equal 'bar', dc.get(key)
|
||||
sleep 1.2
|
||||
- assert_equal nil, dc.get(key)
|
||||
+ assert_nil dc.get(key)
|
||||
end
|
||||
end
|
||||
end
|
@ -1,2 +0,0 @@
|
||||
SHA512 (dalli-3.2.0.gem) = 38ad6d254f1786ffd5bc7ecdae815ca5dc5cdbae5fb390d25a83b1a473fe737c63cf6f5c4bc5b2aefaaf536f3804eeb4bc6ed1e2d86035f534901db6a8de1f4d
|
||||
SHA512 (dalli-3.2.0-tests.txz) = bd1534b9b042960415705e2d7c0dcabc47221b2b01967b567be1715d9adc984f994429538a42ba1243284d40af99ba6abe1cd0cc0b99d7fbe6df58b29b2806f2
|
Loading…
Reference in new issue