test/algolia/unit/retry_strategy_test.rb in algolia-2.0.0.pre.alpha.4 vs test/algolia/unit/retry_strategy_test.rb in algolia-2.0.0.pre.beta.1
- old
+ new
@@ -11,11 +11,11 @@
@api_key = 'api_key'
stateful_hosts = []
stateful_hosts << "#{@app_id}-4.algolianet.com"
stateful_hosts << "#{@app_id}-5.algolianet.com"
stateful_hosts << "#{@app_id}-6.algolianet.com"
- @config = Algolia::Search::Config.new(app_id: @app_id, api_key: @api_key, custom_hosts: stateful_hosts)
+ @config = Algolia::Search::Config.new(application_id: @app_id, api_key: @api_key, custom_hosts: stateful_hosts)
end
def test_resets_expired_hosts_according_to_read_type
@config.default_hosts[1].up = false
retry_strategy = Algolia::Transport::RetryStrategy.new(@config)
@@ -72,11 +72,11 @@
end
describe 'All hosts are unreachable' do
def test_failure_when_all_hosts_are_down
stateful_hosts = ['0.0.0.0']
- @config = Algolia::Search::Config.new(app_id: 'foo', api_key: 'bar', custom_hosts: stateful_hosts)
+ @config = Algolia::Search::Config.new(application_id: 'foo', api_key: 'bar', custom_hosts: stateful_hosts)
client = Algolia::Search::Client.create_with_config(@config)
index = client.init_index(get_test_index_name('failure'))
exception = assert_raises Algolia::AlgoliaUnreachableHostError do
index.save_object({ objectID: 'one' })
@@ -89,10 +89,10 @@
describe 'retry stategy decisions' do
def before_all
super
@app_id = 'app_id'
@api_key = 'api_key'
- @config = Algolia::Search::Config.new(app_id: @app_id, api_key: @api_key)
+ @config = Algolia::Search::Config.new(application_id: @app_id, api_key: @api_key)
@retry_strategy = Algolia::Transport::RetryStrategy.new(@config)
@hosts = @retry_strategy.get_tryable_hosts(READ|WRITE)
end
def test_retry_decision_on_300