Commit e1589efa by 张乐 Committed by GitHub

Merge pull request #389 from nobodyiam/client-ut-fix

fix ut
parents a148282a a4cb3b9a
......@@ -254,7 +254,11 @@ public class RemoteConfigRepositoryTest extends ComponentTestCase {
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment