Commit a4cb3b9a by Jason Song

fix ut

parent a148282a
...@@ -254,8 +254,12 @@ public class RemoteConfigRepositoryTest extends ComponentTestCase { ...@@ -254,8 +254,12 @@ public class RemoteConfigRepositoryTest extends ComponentTestCase {
public static class MockHttpUtil extends HttpUtil { public static class MockHttpUtil extends HttpUtil {
@Override @Override
public <T> HttpResponse<T> doGet(HttpRequest httpRequest, Class<T> responseType) { public <T> HttpResponse<T> doGet(HttpRequest httpRequest, Class<T> responseType) {
if (someResponse.getStatusCode() == 200 || someResponse.getStatusCode() == 304 ) {
return (HttpResponse<T>) someResponse; return (HttpResponse<T>) someResponse;
} }
throw new ApolloConfigException(String.format("Http request failed due to status code: %d",
someResponse.getStatusCode()));
}
@Override @Override
public <T> HttpResponse<T> doGet(HttpRequest httpRequest, Type responseType) { public <T> HttpResponse<T> doGet(HttpRequest httpRequest, Type responseType) {
......
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