This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new e158b76 Regen
e158b76 is described below
commit e158b768faac2821862061b6f4a96b62fef6bee5
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Mar 6 08:24:46 2022 +0100
Regen
---
.../huaweicloud/frs/FaceRecognitionProducer.java | 54 +++++---
.../frs/FaceRecognitionInvalidParamsTest.java | 149 +++++++++++----------
...erificationWithImageBae64AndMockClientTest.java | 26 ++--
3 files changed, 123 insertions(+), 106 deletions(-)
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/main/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionProducer.java
b/components/camel-huawei/camel-huaweicloud-frs/src/main/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionProducer.java
index 67a2d3d..0de1cc7 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/main/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionProducer.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/main/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionProducer.java
@@ -99,8 +99,8 @@ public class FaceRecognitionProducer extends DefaultProducer {
/**
* initialize clientConfigurations
*
- * @param endpoint FrsEndpoint
- * @return ClientConfigurations
+ * @param endpoint FrsEndpoint
+ * @return ClientConfigurations
*/
private ClientConfigurations
initializeConfigurations(FaceRecognitionEndpoint endpoint) {
ClientConfigurations clientConfigurations = new ClientConfigurations();
@@ -173,7 +173,8 @@ public class FaceRecognitionProducer extends
DefaultProducer {
SdkResponse result;
switch (clientConfigurations.getInputSourceType()) {
case BASE64:
- FaceDetectBase64Req base64ReqBody = new
FaceDetectBase64Req().withImageBase64(clientConfigurations.getImageBase64());
+ FaceDetectBase64Req base64ReqBody
+ = new
FaceDetectBase64Req().withImageBase64(clientConfigurations.getImageBase64());
result = this.frsClient.detectFaceByBase64(new
DetectFaceByBase64Request().withBody(base64ReqBody));
break;
case URL:
@@ -182,7 +183,8 @@ public class FaceRecognitionProducer extends
DefaultProducer {
break;
default:
try (FileInputStream inputStream = new
FileInputStream(clientConfigurations.getImageFilePath())) {
- DetectFaceByFileRequestBody fileReqBody = new
DetectFaceByFileRequestBody().withImageFile(inputStream,
getFileName(clientConfigurations.getImageFilePath()));
+ DetectFaceByFileRequestBody fileReqBody = new
DetectFaceByFileRequestBody().withImageFile(inputStream,
+
getFileName(clientConfigurations.getImageFilePath()));
result = this.frsClient.detectFaceByFile(new
DetectFaceByFileRequest().withBody(fileReqBody));
} catch (IOException e) {
throw new IllegalArgumentException(
@@ -202,8 +204,9 @@ public class FaceRecognitionProducer extends
DefaultProducer {
SdkResponse result;
switch (clientConfigurations.getInputSourceType()) {
case BASE64:
- FaceCompareBase64Req base64ReqBody = new
FaceCompareBase64Req().withImage1Base64(clientConfigurations.getImageBase64())
-
.withImage2Base64(clientConfigurations.getAnotherImageBase64());
+ FaceCompareBase64Req base64ReqBody
+ = new
FaceCompareBase64Req().withImage1Base64(clientConfigurations.getImageBase64())
+
.withImage2Base64(clientConfigurations.getAnotherImageBase64());
result = this.frsClient.compareFaceByBase64(new
CompareFaceByBase64Request().withBody(base64ReqBody));
break;
case URL:
@@ -220,7 +223,8 @@ public class FaceRecognitionProducer extends
DefaultProducer {
result = this.frsClient.compareFaceByFile(new
CompareFaceByFileRequest().withBody(fileReqBody));
} catch (IOException e) {
throw new IllegalArgumentException(
- String.format("Image file paths are invalid: %s,
%s", clientConfigurations.getImageFilePath(),
clientConfigurations.getAnotherImageFilePath()));
+ String.format("Image file paths are invalid: %s,
%s", clientConfigurations.getImageFilePath(),
+
clientConfigurations.getAnotherImageFilePath()));
}
}
exchange.getMessage().setBody(result);
@@ -236,7 +240,8 @@ public class FaceRecognitionProducer extends
DefaultProducer {
SdkResponse result;
switch (clientConfigurations.getInputSourceType()) {
case BASE64:
- LiveDetectBase64Req base64ReqBody = new
LiveDetectBase64Req().withVideoBase64(clientConfigurations.getVideoBase64())
+ LiveDetectBase64Req base64ReqBody = new LiveDetectBase64Req()
+ .withVideoBase64(clientConfigurations.getVideoBase64())
.withActions(clientConfigurations.getActions()).withActionTime(clientConfigurations.getActionTimes());
result = this.frsClient.detectLiveByBase64(new
DetectLiveByBase64Request().withBody(base64ReqBody));
break;
@@ -247,8 +252,10 @@ public class FaceRecognitionProducer extends
DefaultProducer {
break;
default:
try (FileInputStream inputStream = new
FileInputStream(clientConfigurations.getVideoFilePath())) {
- DetectLiveByFileRequestBody fileReqBody = new
DetectLiveByFileRequestBody().withVideoFile(inputStream,
getFileName(clientConfigurations.getVideoFilePath()))
-
.withActions(clientConfigurations.getActions()).withActionTime(clientConfigurations.getActionTimes());
+ DetectLiveByFileRequestBody fileReqBody = new
DetectLiveByFileRequestBody()
+ .withVideoFile(inputStream,
getFileName(clientConfigurations.getVideoFilePath()))
+ .withActions(clientConfigurations.getActions())
+
.withActionTime(clientConfigurations.getActionTimes());
result = this.frsClient.detectLiveByFile(new
DetectLiveByFileRequest().withBody(fileReqBody));
} catch (IOException e) {
throw new IllegalArgumentException(
@@ -276,7 +283,8 @@ public class FaceRecognitionProducer extends
DefaultProducer {
return;
}
String imageFilePath =
exchange.getProperty(FaceRecognitionProperties.FACE_IMAGE_FILE_PATH,
String.class);
-
clientConfigurations.setImageFilePath(StringUtils.isEmpty(imageFilePath) ?
this.endpoint.getImageFilePath() : imageFilePath);
+ clientConfigurations
+ .setImageFilePath(StringUtils.isEmpty(imageFilePath) ?
this.endpoint.getImageFilePath() : imageFilePath);
if (!StringUtils.isEmpty(clientConfigurations.getImageFilePath())) {
clientConfigurations.setInputSourceType(InputSourceType.FILE_PATH);
return;
@@ -288,24 +296,31 @@ public class FaceRecognitionProducer extends
DefaultProducer {
String image1Base64 =
exchange.getProperty(FaceRecognitionProperties.FACE_IMAGE_BASE64, String.class);
String image2Base64 =
exchange.getProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_BASE64,
String.class);
clientConfigurations.setImageBase64(StringUtils.isEmpty(image1Base64)
? this.endpoint.getImageBase64() : image1Base64);
-
clientConfigurations.setAnotherImageBase64(StringUtils.isEmpty(image2Base64) ?
this.endpoint.getAnotherImageBase64() : image2Base64);
- if (!StringUtils.isEmpty(clientConfigurations.getImageBase64()) &&
!StringUtils.isEmpty(clientConfigurations.getAnotherImageBase64())) {
+ clientConfigurations.setAnotherImageBase64(
+ StringUtils.isEmpty(image2Base64) ?
this.endpoint.getAnotherImageBase64() : image2Base64);
+ if (!StringUtils.isEmpty(clientConfigurations.getImageBase64())
+ &&
!StringUtils.isEmpty(clientConfigurations.getAnotherImageBase64())) {
clientConfigurations.setInputSourceType(InputSourceType.BASE64);
return;
}
String image1Url =
exchange.getProperty(FaceRecognitionProperties.FACE_IMAGE_URL, String.class);
String image2Url =
exchange.getProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_URL,
String.class);
clientConfigurations.setImageUrl(StringUtils.isEmpty(image1Url) ?
this.endpoint.getImageUrl() : image1Url);
- clientConfigurations.setAnotherImageUrl(StringUtils.isEmpty(image2Url)
? this.endpoint.getAnotherImageUrl() : image2Url);
- if (!StringUtils.isEmpty(clientConfigurations.getImageUrl()) &&
!StringUtils.isEmpty(clientConfigurations.getAnotherImageUrl())) {
+ clientConfigurations
+ .setAnotherImageUrl(StringUtils.isEmpty(image2Url) ?
this.endpoint.getAnotherImageUrl() : image2Url);
+ if (!StringUtils.isEmpty(clientConfigurations.getImageUrl())
+ &&
!StringUtils.isEmpty(clientConfigurations.getAnotherImageUrl())) {
clientConfigurations.setInputSourceType(InputSourceType.URL);
return;
}
String image1FilePath =
exchange.getProperty(FaceRecognitionProperties.FACE_IMAGE_FILE_PATH,
String.class);
String image2FilePath =
exchange.getProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_FILE_PATH,
String.class);
-
clientConfigurations.setImageFilePath(StringUtils.isEmpty(image1FilePath) ?
this.endpoint.getImageFilePath() : image1FilePath);
-
clientConfigurations.setAnotherImageFilePath(StringUtils.isEmpty(image2FilePath)
? this.endpoint.getAnotherImageFilePath() : image2FilePath);
- if (!StringUtils.isEmpty(clientConfigurations.getImageFilePath()) &&
!StringUtils.isEmpty(clientConfigurations.getAnotherImageFilePath())) {
+ clientConfigurations
+ .setImageFilePath(StringUtils.isEmpty(image1FilePath) ?
this.endpoint.getImageFilePath() : image1FilePath);
+ clientConfigurations.setAnotherImageFilePath(
+ StringUtils.isEmpty(image2FilePath) ?
this.endpoint.getAnotherImageFilePath() : image2FilePath);
+ if (!StringUtils.isEmpty(clientConfigurations.getImageFilePath())
+ &&
!StringUtils.isEmpty(clientConfigurations.getAnotherImageFilePath())) {
clientConfigurations.setInputSourceType(InputSourceType.FILE_PATH);
return;
}
@@ -338,7 +353,8 @@ public class FaceRecognitionProducer extends
DefaultProducer {
return;
}
String videoFilePath =
exchange.getProperty(FaceRecognitionProperties.FACE_VIDEO_FILE_PATH,
String.class);
-
clientConfigurations.setVideoFilePath(StringUtils.isEmpty(videoFilePath) ?
this.endpoint.getVideoFilePath() : videoFilePath);
+ clientConfigurations
+ .setVideoFilePath(StringUtils.isEmpty(videoFilePath) ?
this.endpoint.getVideoFilePath() : videoFilePath);
if (!StringUtils.isEmpty(clientConfigurations.getVideoFilePath())) {
clientConfigurations.setInputSourceType(InputSourceType.FILE_PATH);
return;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionInvalidParamsTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionInvalidParamsTest.java
index 4e69702..46959be 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionInvalidParamsTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionInvalidParamsTest.java
@@ -34,91 +34,91 @@ public class FaceRecognitionInvalidParamsTest extends
CamelTestSupport {
public void configure() {
from("direct:access_key_not_set")
.to("hwcloud-frs:faceDetection?"
- + "secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:secret_key_not_set")
.to("hwcloud-frs:faceDetection?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:project_id_not_set")
.to("hwcloud-frs:faceDetection?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:region_id_not_set")
.to("hwcloud-frs:faceDetection?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:operation_not_set")
.to("hwcloud-frs:?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:operation_invalid")
.to("hwcloud-frs:test?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:face_detection_image_not_set")
.to("hwcloud-frs:faceDetection?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:face_detection_image_file_not_found")
.setProperty(FaceRecognitionProperties.FACE_IMAGE_FILE_PATH,
constant(testFilePath))
.to("hwcloud-frs:faceDetection?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:face_verification_image_not_set")
.to("hwcloud-frs:faceVerification?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:face_verification_only_one_image_set")
.setProperty(FaceRecognitionProperties.FACE_IMAGE_FILE_PATH,
constant(testConfiguration.getProperty("imageFilePath")))
.to("hwcloud-frs:faceVerification?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:face_verification_image_sources_not_match")
@@ -127,11 +127,11 @@ public class FaceRecognitionInvalidParamsTest extends
CamelTestSupport {
.setProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_URL,
constant(testConfiguration.getProperty("imageFilePath")))
.to("hwcloud-frs:faceVerification?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:face_verification_image_file_not_found")
@@ -139,43 +139,43 @@ public class FaceRecognitionInvalidParamsTest extends
CamelTestSupport {
.setProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_FILE_PATH,
constant(testConfiguration.getProperty("imageFilePath")))
.to("hwcloud-frs:faceVerification?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:face_live_detection_video_not_set")
.to("hwcloud-frs:faceLiveDetection?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&actions=1,2,3"
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&actions=1,2,3"
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:face_live_detection_video_file_not_found")
.setProperty(FaceRecognitionProperties.FACE_VIDEO_FILE_PATH,
constant(testFilePath))
.to("hwcloud-frs:faceLiveDetection?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&actions=1,2,3"
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&actions=1,2,3"
+ + "&ignoreSslVerification=true")
.to("mock:result");
from("direct:face_live_detection_actions_not_set")
.setProperty(FaceRecognitionProperties.FACE_VIDEO_FILE_PATH,
constant(testConfiguration.getProperty("videoFilePath")))
.to("hwcloud-frs:faceLiveDetection?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true")
.to("mock:result");
}
};
@@ -323,7 +323,8 @@ public class FaceRecognitionInvalidParamsTest extends
CamelTestSupport {
Exception exception = assertThrows(CamelExecutionException.class,
() ->
template.sendBody("direct:face_verification_image_file_not_found", ""));
assertTrue(exception.getCause() instanceof IllegalArgumentException);
- String expectedMessage = String.format("Image file paths are invalid:
%s, %s", testFilePath, testConfiguration.getProperty("imageFilePath"));
+ String expectedMessage = String.format("Image file paths are invalid:
%s, %s", testFilePath,
+ testConfiguration.getProperty("imageFilePath"));
assertEquals(exception.getCause().getMessage(), expectedMessage);
}
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
index 70cdfbd..bca77b5 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
@@ -44,12 +44,12 @@ public class
FaceVerificationWithImageBae64AndMockClientTest extends CamelTestSu
.setProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_BASE64,
constant(testConfiguration.getProperty("anotherImageBase64")))
.to("hwcloud-frs:faceVerification?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&ignoreSslVerification=true"
- + "&frsClient=#frsClient")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&ignoreSslVerification=true"
+ + "&frsClient=#frsClient")
.log("perform faceVerification successfully")
.to("mock:perform_face_verification_result_01");
@@ -57,13 +57,13 @@ public class
FaceVerificationWithImageBae64AndMockClientTest extends CamelTestSu
.setProperty(FaceRecognitionProperties.FACE_IMAGE_BASE64,
constant(testConfiguration.getProperty("imageBase64")))
.to("hwcloud-frs:faceVerification?"
- + "accessKey=" +
testConfiguration.getProperty("accessKey")
- + "&secretKey=" +
testConfiguration.getProperty("secretKey")
- + "&projectId=" +
testConfiguration.getProperty("projectId")
- + "®ion=" +
testConfiguration.getProperty("region")
- + "&anotherImageBase64=" +
constant(testConfiguration.getProperty("anotherImageBase64"))
- + "&ignoreSslVerification=true"
- + "&frsClient=#frsClient")
+ + "accessKey=" +
testConfiguration.getProperty("accessKey")
+ + "&secretKey=" +
testConfiguration.getProperty("secretKey")
+ + "&projectId=" +
testConfiguration.getProperty("projectId")
+ + "®ion=" +
testConfiguration.getProperty("region")
+ + "&anotherImageBase64=" +
constant(testConfiguration.getProperty("anotherImageBase64"))
+ + "&ignoreSslVerification=true"
+ + "&frsClient=#frsClient")
.log("perform faceVerification successfully")
.to("mock:perform_face_verification_result_02");
}