• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

algolia / algoliasearch-client-ruby / 389
97%

Build:
DEFAULT BRANCH: master
Ran 11 Jan 2017 07:05PM UTC
Jobs 5
Files 6
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
389

Pull #162

travis-ci

web-flow
Update fallback host logic to reflect comment

The behavior exhibited by the if statement does not reflect the
description in the comment below it: instead of reusing a fallback host if
it's been in use for less than a minute, it actually reuses the fallback
host only if it was last used more than a minute ago.

This was not caught by the test that was added with it, because the test
logic is faulty as well: the only way it could fail is if the value of
`Time.now` actually decreased over time.

This updates the test to assert that the second call completes in less
than a second, rather than timing out, and updates the logic to continue
to use the current (not first) host if the first host was last called
less than a minute ago.

Finally, the DNS timeout test context is modified to reset the client
and thread local variables before each test, rather than before all of
them; otherwise the timeout in the first test case causes the first
check in the second test case to fail (since the client has already
fallen back to the second host)
Pull Request #162: Update fallback host logic to reflect comment

1 of 1 new or added line in 1 file covered. (100.0%)

195 of 620 relevant lines covered (31.45%)

1.57 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
lib/algolia/client.rb

Uncovered Existing Lines

Lines Coverage ∆ File
3
100.0
lib/algolia/error.rb
31
100.0
lib/algolia/protocol.rb
148
100.0
lib/algolia/client.rb
197
100.0
lib/algolia/index.rb
Jobs
ID Job ID Ran Files Coverage
2 389.2 (1.9.3) 11 Jan 2017 07:05PM UTC 0
31.5
Travis Job 389.2
3 389.3 (2.0.0) 11 Jan 2017 07:06PM UTC 0
31.5
Travis Job 389.3
4 389.4 (2.1.10) 11 Jan 2017 07:07PM UTC 0
31.5
Travis Job 389.4
5 389.5 (2.2.5) 11 Jan 2017 07:08PM UTC 0
31.5
Travis Job 389.5
6 389.6 (2.3.1) 11 Jan 2017 07:08PM UTC 0
31.5
Travis Job 389.6
Source Files on build 389
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #389
  • Pull Request #162
  • PR Base - master (#388)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc