Skip to content
Snippets Groups Projects
Commit 8f75d11a authored by Apertis package maintainers's avatar Apertis package maintainers
Browse files

Import Upstream version 2.7.11

parents
No related branches found
Tags debian/3.0.9-1
No related merge requests found
Pipeline #498517 skipped
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# encoding: utf-8
# frozen_string_literal: true
require_relative 'helper'
require 'json'
describe 'Serializer' do
it 'default to Marshal' do
memcached(29198) do |dc|
dc.set 1,2
assert_equal Marshal, dc.instance_variable_get('@ring').servers.first.serializer
end
end
it 'support a custom serializer' do
memcached(29198) do |dc, port|
memcache = Dalli::Client.new("127.0.0.1:#{port}", :serializer => JSON)
memcache.set 1,2
begin
assert_equal JSON, memcache.instance_variable_get('@ring').servers.first.serializer
memcached(21956) do |newdc|
assert newdc.set("json_test", {"foo" => "bar"})
assert_equal({"foo" => "bar"}, newdc.get("json_test"))
end
end
end
end
end
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment