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

sachin-handiekar / jInstagram / 322
62%

Build:
DEFAULT BRANCH: master
Ran 24 Nov 2016 05:38PM UTC
Jobs 1
Files 85
Run time 5s
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
322

Pull #186

travis-ci

web-flow
add retry logic on response stream failure

Motivation

The instagram API, over HTTP 1.1, occasionally exhibits these
issues:

- socket reset of TCP connection
- partial JSON response stream leading to JSON parse errors

This addresses the errors by retrying the request when either a
socket exception or JSON parse error occurs.

It is worth noting that the instagram API over HTTP2 does not
seem to have these issues. It would be much more work to allow
HTTP 2, at this point, because Java does not support in their
native APIs.

Solution

Provide a configurable setting to retry the request on stream
failure.

Only one retry is attempted. If the response failed again the
errors will be propagated.

Missing

A test should be provided to check the retry logic.

retry on invalid json response

single retry; must be enabled in InstagramConfig

fix retry logic
Pull Request #186: add retry logic on response stream failure

48 of 48 new or added lines in 3 files covered. (100.0%)

947 of 1689 relevant lines covered (56.07%)

5.01 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
src/main/java/org/jinstagram/http/Response.java
3
100.0
src/main/java/org/jinstagram/InstagramConfig.java
41
100.0
src/main/java/org/jinstagram/InstagramBase.java

Uncovered Existing Lines

Lines Coverage ∆ File
2
100.0
src/main/java/org/jinstagram/exceptions/InstagramBadRequestException.java
2
100.0
src/main/java/org/jinstagram/http/Response.java
2
100.0
src/main/java/org/jinstagram/utils/Preconditions.java
2
100.0
src/main/java/org/jinstagram/exceptions/InstagramRateLimitException.java
2
100.0
src/main/java/org/jinstagram/InstagramObject.java
5
100.0
src/main/java/org/jinstagram/utils/LogHelper.java
5
100.0
src/main/java/org/jinstagram/InstagramConfig.java
9
100.0
src/main/java/org/jinstagram/http/Request.java
10
100.0
src/main/java/org/jinstagram/http/URLUtils.java
21
100.0
src/main/java/org/jinstagram/entity/common/InstagramErrorResponse.java
26
100.0
src/main/java/org/jinstagram/Instagram.java
207
100.0
src/main/java/org/jinstagram/InstagramBase.java
Jobs
ID Job ID Ran Files Coverage
1 322.1 24 Nov 2016 05:38PM UTC 0
56.09
Travis Job 322.1
Source Files on build 322
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #322
  • Pull Request #186
  • PR Base - master (#321)
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