Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ jobs:
strategy:
matrix:
ruby:
- '2.5' # earliest supported
- '3.0' # latest release
- '3.4' # latest release

steps:
- run: |
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ gemspec

gem 'test-unit'
gem "stackprof"
gem "ostruct"

group :benchmark do
gem "remix-stash", '~> 1.1.3'
Expand Down
52 changes: 35 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,47 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
activesupport (8.0.3)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
concurrent-ruby (1.1.8)
dalli (2.7.11)
i18n (1.8.10)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.3.1)
concurrent-ruby (1.3.5)
connection_pool (2.5.4)
dalli (3.2.8)
drb (2.2.3)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
logger (1.7.0)
memcache-client (1.8.5)
minitest (5.14.4)
mocha (1.12.0)
power_assert (2.0.0)
rake (13.0.3)
rake-compiler (1.1.1)
minitest (5.26.0)
mocha (2.7.1)
ruby2_keywords (>= 0.0.5)
ostruct (0.6.3)
power_assert (2.0.5)
rake (13.3.0)
rake-compiler (1.3.0)
rake
remix-stash (1.1.3)
stackprof (0.2.17)
test-unit (3.4.0)
ruby2_keywords (0.0.5)
securerandom (0.4.1)
stackprof (0.2.27)
test-unit (3.7.0)
power_assert
tzinfo (2.0.4)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
zeitwerk (2.4.2)
uri (1.0.4)

PLATFORMS
ruby
Expand All @@ -40,11 +57,12 @@ DEPENDENCIES
memcache-client
memcached!
mocha
ostruct
rake
rake-compiler
remix-stash (~> 1.1.3)
stackprof
test-unit

BUNDLED WITH
2.1.4
2.7.2
4 changes: 3 additions & 1 deletion test/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
UNIX_SOCKET_NAME = File.join(ENV['TMPDIR']||'/tmp','memcached')

# Kill memcached
system("killall -9 memcached")
unless ENV['CI']
system("killall -9 memcached")
end

# Start memcached
verbosity = (ENV['DEBUG'] ? "-vv" : "")
Expand Down
2 changes: 1 addition & 1 deletion test/unit/memcached_experimental_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_reset
private

def key
caller.first[/.*[` ](.*)'/, 1] # '
caller.first[/.*[`' ](.*)'/, 1] # '
Comment thread
composerinteralia marked this conversation as resolved.
end

def stub_server(port)
Expand Down
6 changes: 3 additions & 3 deletions test/unit/memcached_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def test_get_multi_missing
@cache.set "#{key}_3", 3
@cache.delete "#{key}_4" rescue nil
assert_equal(
{"test_get_multi_missing_3"=>3, "test_get_multi_missing_1"=>1},
{"#{key}_3"=>3, "#{key}_1"=>1},
@cache.get(["#{key}_1", "#{key}_2", "#{key}_3", "#{key}_4"])
)
end
Expand All @@ -432,7 +432,7 @@ def test_get_multi_binary
@binary_protocol_cache.delete "#{key}_2" rescue nil
@binary_protocol_cache.set "#{key}_3", 3
assert_equal(
{"test_get_multi_binary_3"=>3, "test_get_multi_binary_1"=>1},
{"#{key}_3"=>3, "#{key}_1"=>1},
@binary_protocol_cache.get(["#{key}_1", "#{key}_2", "#{key}_3"])
)
end
Expand Down Expand Up @@ -1582,7 +1582,7 @@ def interrupt_test_with_options(key, options)
end

def key
caller.first[/.*[` ](.*)'/, 1] # '
caller.first[/.*[`' ](.*)'/, 1] # '
Comment thread
composerinteralia marked this conversation as resolved.
end

def stub_server(port)
Expand Down
4 changes: 2 additions & 2 deletions test/unit/rails_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def test_fetch
assert_equal @value, @cache.fetch("x"){ 1 }

# works with options
@cache.expects(:write).with("y", 1, :foo => :bar)
@cache.expects(:write).with("y", 1, {:foo => :bar})
@cache.fetch("y", :foo => :bar){ 1 }
end

Expand Down Expand Up @@ -325,7 +325,7 @@ def test_write_with_nil_options
private

def key
caller.first[/.*[` ](.*)'/, 1] # '
caller.first[/.*[`' ](.*)'/, 1] # '
Comment thread
composerinteralia marked this conversation as resolved.
end

def compare_servers(cache, servers)
Expand Down