RUBY-376 use new seed nodes first
This commit is contained in:
parent
b579a6347f
commit
29f3772053
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue