Skip to content

Commit

Permalink
Add log to identify the failure IT root cause
Browse files Browse the repository at this point in the history
Signed-off-by: zane-neo <[email protected]>
  • Loading branch information
zane-neo committed Jun 6, 2024
1 parent 496f178 commit 845abdc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.util.function.Consumer;
import java.util.stream.Collectors;

import lombok.extern.log4j.Log4j2;
import org.apache.hc.client5.http.auth.AuthScope;
import org.apache.hc.client5.http.auth.UsernamePasswordCredentials;
import org.apache.hc.client5.http.impl.auth.BasicCredentialsProvider;
Expand Down Expand Up @@ -103,6 +104,7 @@
import com.google.gson.Gson;
import com.google.gson.JsonArray;

@Log4j2
public abstract class MLCommonsRestTestCase extends OpenSearchRestTestCase {
protected Gson gson = new Gson();
public static long CUSTOM_MODEL_TIMEOUT = 20_000; // 20 seconds
Expand Down Expand Up @@ -856,6 +858,7 @@ public static Map parseResponseToMap(Response response) throws IOException {
HttpEntity entity = response.getEntity();
assertNotNull(response);
String entityString = TestHelper.httpEntityToString(entity);
log.info("response: {}", entityString);
return StringUtils.gson.fromJson(entityString, Map.class);
}

Expand Down

0 comments on commit 845abdc

Please sign in to comment.