Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodyiam committed Aug 24, 2016
1 parent a148282 commit a4cb3b9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ public void initialize() throws InitializationException {
public static class MockHttpUtil extends HttpUtil {
@Override
public <T> HttpResponse<T> doGet(HttpRequest httpRequest, Class<T> responseType) {
return (HttpResponse<T>) someResponse;
if (someResponse.getStatusCode() == 200 || someResponse.getStatusCode() == 304 ) {
return (HttpResponse<T>) someResponse;
}
throw new ApolloConfigException(String.format("Http request failed due to status code: %d",
someResponse.getStatusCode()));
}

@Override
Expand Down

0 comments on commit a4cb3b9

Please sign in to comment.