lib/switchman/test_helper.rb in switchman-2.0.13 vs lib/switchman/test_helper.rb in switchman-2.1.0

- old
+ new

@@ -15,16 +15,10 @@ return [nil, nil] end Shard.default(reload: true) end - # can't auto-create a new shard on the default shard's db server if the - # default shard is split across multiple db servers - if ::ActiveRecord::Base.connection_handler.connection_pool_list.length > 1 - server1 = DatabaseServer.create(Shard.default.database_server.config) - else - server1 = Shard.default.database_server - end + server1 = Shard.default.database_server server2 = DatabaseServer.create(Shard.default.database_server.config.merge(server2: true)) if server1 == Shard.default.database_server && server1.config[:shard1] && server1.config[:shard2] # look for the shards in the db already shard1 = find_existing_test_shard(server1, server1.config[:shard1])