diff --git a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutorTest.java b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutorTest.java index e7e0fca7f8..20b7dc72a5 100644 --- a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutorTest.java +++ b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/remote/HttpJsonConnectorExecutorTest.java @@ -66,7 +66,7 @@ public void setUp() { MockitoAnnotations.openMocks(this); } - public void invokeRemoteModel_SuccessPath(String httpMethod) { + public void invokeRemoteModelSuccessPath(String httpMethod) { try { ConnectorAction predictAction = ConnectorAction.builder() .actionType(ConnectorAction.ActionType.PREDICT) @@ -95,7 +95,7 @@ public void invokeRemoteModel_SuccessPath(String httpMethod) { } } - public void invokeRemoteModel_HeaderTest(Map header) throws ClientProtocolException, IOException { + public void invokeRemoteModelHeaderTest(Map header) throws ClientProtocolException, IOException { ConnectorAction predictAction = ConnectorAction.builder() .actionType(ConnectorAction.ActionType.PREDICT) .method("GET") @@ -137,29 +137,29 @@ public void invokeRemoteModel_HeaderTest(Map header) throws Clie } } @Test - public void invokeRemoteModel_GETMethodSuccessPath() { - invokeRemoteModel_SuccessPath("GET"); + public void invokeRemoteModelGETMethodSuccessPath() { + invokeRemoteModelSuccessPath("GET"); } @Test - public void invokeRemoteModel_POSTMethodSuccessPath() { - invokeRemoteModel_SuccessPath("POST"); + public void invokeRemoteModelPOSTMethodSuccessPath() { + invokeRemoteModelSuccessPath("POST"); } @Test - public void invokeRemoteModel_HeaderNull() throws ClientProtocolException, IOException { - invokeRemoteModel_HeaderTest(null); + public void invokeRemoteModelHeaderNull() throws ClientProtocolException, IOException { + invokeRemoteModelHeaderTest(null); } @Test - public void invokeRemoteModel_HeaderNotNull() throws ClientProtocolException, IOException { + public void invokeRemoteModelHeaderNotNull() throws ClientProtocolException, IOException { Map headers = new HashMap<>(); headers.put("api_key", "${credential.key}"); headers.put("Content-type", "application/json"); - invokeRemoteModel_HeaderTest(headers); + invokeRemoteModelHeaderTest(headers); } @Test - public void invokeRemoteModel_POSTMethodErrorPath() { + public void invokeRemoteModelPOSTMethodErrorPath() { exceptionRule.expect(MLException.class); exceptionRule.expectMessage("Failed to create http request for remote model"); @@ -179,7 +179,7 @@ public void invokeRemoteModel_POSTMethodErrorPath() { } @Test - public void invokeRemoteModel_GETMethodErrorPath() { + public void invokeRemoteModelGETMethodErrorPath() { exceptionRule.expect(MLException.class); exceptionRule.expectMessage("Failed to create http request for remote model"); @@ -200,7 +200,7 @@ public void invokeRemoteModel_GETMethodErrorPath() { } @Test - public void invokeRemoteModel_WrongHttpMethod() { + public void invokeRemoteModelWrongHttpMethod() { exceptionRule.expect(IllegalArgumentException.class); exceptionRule.expectMessage("unsupported http method"); ConnectorAction predictAction = ConnectorAction.builder() @@ -220,7 +220,7 @@ public void invokeRemoteModel_WrongHttpMethod() { } @Test - public void executePredict_RemoteInferenceInput() throws IOException { + public void executePredictRemoteInferenceInput() throws IOException { ConnectorAction predictAction = ConnectorAction.builder() .actionType(ConnectorAction.ActionType.PREDICT) .method("POST") @@ -242,7 +242,7 @@ public void executePredict_RemoteInferenceInput() throws IOException { } @Test - public void executePredict_TextDocsInput_NoPreprocessFunction() throws IOException { + public void executePredictTextDocsInputNoPreprocessFunction() throws IOException { ConnectorAction predictAction = ConnectorAction.builder() .actionType(ConnectorAction.ActionType.PREDICT) .method("POST") @@ -264,7 +264,7 @@ public void executePredict_TextDocsInput_NoPreprocessFunction() throws IOExcepti } @Test - public void executePredict_TextDocsInput() throws IOException { + public void executePredictTextDocsInput() throws IOException { String preprocessResult1 = "{\"parameters\": { \"input\": \"test doc1\" } }"; String preprocessResult2 = "{\"parameters\": { \"input\": \"test doc2\" } }"; when(scriptService.compile(any(), any()))