Sha256: 3ef7c444f9ef6ed421a2798386b3f03663d093be3c39fba24d78eafc1043228b
Contents?: true
Size: 992 Bytes
Versions: 2
Compression:
Stored size: 992 Bytes
Contents
# encoding: UTF-8 require File.expand_path("./helper", File.dirname(__FILE__)) require "redis/distributed" setup do log = StringIO.new init Redis::Distributed.new(NODES, :logger => ::Logger.new(log)) end test "INFO" do |r| %w(last_save_time redis_version total_connections_received connected_clients total_commands_processed connected_slaves uptime_in_seconds used_memory uptime_in_days changes_since_last_save).each do |x| r.info.each do |info| assert info.keys.include?(x) end end end test "INFO COMMANDSTATS" do |r| # Only available on Redis >= 2.9.0 next if version(r) < 209000 r.nodes.each { |n| n.config(:resetstat) } r.ping # Executed on every node r.info(:commandstats).each do |info| assert "1" == info["ping"]["calls"] end end test "MONITOR" do |r| begin r.monitor rescue Exception => ex ensure assert ex.kind_of?(NotImplementedError) end end test "ECHO" do |r| assert ["foo bar baz\n"] == r.echo("foo bar baz\n") end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
gorsuch-redis-3.0.0.rc1 | test/distributed_remote_server_control_commands_test.rb |
redis-3.0.0.rc1 | test/distributed_remote_server_control_commands_test.rb |