Commit a4cb3b9a by Jason Song

fix ut

parent a148282a
...@@ -254,7 +254,11 @@ public class RemoteConfigRepositoryTest extends ComponentTestCase { ...@@ -254,7 +254,11 @@ 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) {
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 @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