From a3fa4892a62baf0ecb688104ef96094367493230 Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Mon, 13 Feb 2012 18:34:38 -0500 Subject: [PATCH] minor: fix for test_accessors replica set test -- should not test tags on server < 2.0 --- test/replica_sets/basic_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/replica_sets/basic_test.rb b/test/replica_sets/basic_test.rb index 938a7a4..1e9e909 100644 --- a/test/replica_sets/basic_test.rb +++ b/test/replica_sets/basic_test.rb @@ -39,6 +39,7 @@ class BasicTest < Test::Unit::TestCase [@rs.host, @rs.ports[2]]] args = seeds << {:name => @rs.name} @conn = ReplSetConnection.new(*args) + @major_version = @rs.version.first assert_equal @conn.host, @rs.primary[0] assert_equal @conn.port, @rs.primary[1] @@ -50,9 +51,9 @@ class BasicTest < Test::Unit::TestCase assert_equal 2, @conn.secondary_pools.length assert_equal @rs.name, @conn.replica_set_name assert @conn.secondary_pools.include?(@conn.read_pool) - assert_equal 5, @conn.tag_map.keys.length assert_equal 90, @conn.refresh_interval assert_equal @conn.refresh_mode, false + assert_equal 5, @conn.tag_map.keys.length unless @major_version < 2 end context "Socket pools" do