RUBY-376 use new seed nodes first

This commit is contained in:
Kyle Banker 2011-12-02 17:42:18 -05:00
parent b579a6347f
commit 29f3772053
2 changed files with 2 additions and 1 deletions

View File

@ -272,7 +272,7 @@ module Mongo
def update_seed_list(members)
current_members = members.map { |n| n.host_port }
@seeds = (@seeds + current_members).uniq
@seeds = (current_members + @seeds).uniq
end
end

View File

@ -28,6 +28,7 @@ class BasicTest < Test::Unit::TestCase
[self.rs.host, self.rs.ports[2]], [self.rs.host, 19356], :name => self.rs.name)
assert @conn.connected?
assert @conn.seeds.include?([self.rs.host, 19356]), "Original seed nodes not cached!"
assert_equal [self.rs.host, 19356], @conn.seeds.last, "Original seed nodes not cached!"
end
def test_accessors