You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/07/08 03:06:46 UTC

[inlong] branch master updated: [INLONG-4914][Manager] List inlong cluster error when the keyword was not null (#4916)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new c79f27b9b [INLONG-4914][Manager] List inlong cluster error when the keyword was not null (#4916)
c79f27b9b is described below

commit c79f27b9b62d4c8e4b977f7fdec5926bc44d8bad
Author: healchow <he...@gmail.com>
AuthorDate: Fri Jul 8 11:06:42 2022 +0800

    [INLONG-4914][Manager] List inlong cluster error when the keyword was not null (#4916)
---
 .../common/pojo/cluster/ClusterTagRequest.java     |  2 +-
 .../pojo/group/InlongGroupApproveRequest.java      |  4 +--
 .../common/pojo/group/InlongGroupRequest.java      |  4 +--
 .../common/pojo/workflow/WorkflowApprover.java     |  7 +++--
 .../mappers/InlongClusterEntityMapper.xml          |  2 +-
 .../org/apache/inlong/manager/dao/DaoBaseTest.java |  1 +
 .../manager/service/core/impl/SortServiceImpl.java | 27 +++++++++---------
 .../service/core/impl/SortSourceServiceImpl.java   | 29 +++++++++----------
 .../manager/service/group/InlongGroupService.java  | 33 +++++++++++-----------
 .../service/group/InlongGroupServiceImpl.java      | 13 ++++-----
 .../manager/common/utils/ValidationUtilsTest.java  |  4 +--
 .../manager/service/group/GroupServiceTest.java    |  8 +++---
 12 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/cluster/ClusterTagRequest.java b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/cluster/ClusterTagRequest.java
index 885482cb2..fcf27bfa8 100644
--- a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/cluster/ClusterTagRequest.java
+++ b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/cluster/ClusterTagRequest.java
@@ -32,7 +32,7 @@ import javax.validation.constraints.NotNull;
 @ApiModel("Cluster tag request")
 public class ClusterTagRequest {
 
-    @NotNull(groups = UpdateValidation.class, message = "id must not be null")
+    @NotNull(groups = UpdateValidation.class, message = "id cannot be null")
     @ApiModelProperty(value = "Primary key")
     private Integer id;
 
diff --git a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupApproveRequest.java b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupApproveRequest.java
index 0e0ce1399..8ba3944b9 100644
--- a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupApproveRequest.java
+++ b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupApproveRequest.java
@@ -33,11 +33,11 @@ public class InlongGroupApproveRequest {
     @ApiModelProperty(value = "Primary key")
     private Integer id;
 
-    @NotBlank(message = "inlongGroupId must not be blank")
+    @NotBlank(message = "inlongGroupId cannot be blank")
     @ApiModelProperty(value = "Inlong group id", required = true)
     private String inlongGroupId;
 
-    @NotBlank(message = "mqType must not be blank")
+    @NotBlank(message = "mqType cannot be blank")
     @ApiModelProperty(value = "MQ Type")
     private String mqType;
 
diff --git a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupRequest.java b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupRequest.java
index df1082bb1..a4e21b3ff 100644
--- a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupRequest.java
+++ b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupRequest.java
@@ -59,7 +59,7 @@ public class InlongGroupRequest {
     @ApiModelProperty(value = "MQ type, replaced by mqType")
     private String middlewareType;
 
-    @NotBlank(message = "mqType must not be blank")
+    @NotBlank(message = "mqType cannot be blank")
     @ApiModelProperty(value = "MQ type, high throughput: TUBE, high consistency: PULSAR")
     private String mqType;
 
@@ -97,7 +97,7 @@ public class InlongGroupRequest {
     @ApiModelProperty(value = "The maximum length of a single piece of data, unit: Byte")
     private Integer maxLength;
 
-    @NotBlank(message = "inCharges must not be blank")
+    @NotBlank(message = "inCharges cannot be blank")
     @ApiModelProperty(value = "Name of responsible person, separated by commas")
     private String inCharges;
 
diff --git a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/workflow/WorkflowApprover.java b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/workflow/WorkflowApprover.java
index 82d4e3716..d8cee8506 100644
--- a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/workflow/WorkflowApprover.java
+++ b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/workflow/WorkflowApprover.java
@@ -19,20 +19,21 @@ package org.apache.inlong.manager.common.pojo.workflow;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import java.util.Date;
 import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
+import java.util.Date;
+
 /**
- * Approver config of workflow
+ * Workflow approver config
  */
 @Data
 @Builder
 @NoArgsConstructor
 @AllArgsConstructor
-@ApiModel("Approver config of workflow")
+@ApiModel("Workflow approver")
 public class WorkflowApprover {
 
     @ApiModelProperty("id")
diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
index 83be1b4bd..6903e4478 100644
--- a/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
+++ b/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
@@ -110,7 +110,7 @@
                 and ext_tag = #{extTag, jdbcType=VARCHAR}
             </if>
             <if test="keyword != null and keyword != ''">
-                name like CONCAT('%', #{keyword}, '%')
+                and (name like CONCAT('%', #{keyword}, '%')
                 or cluster_tags like CONCAT('%', #{keyword}, '%')
                 or ext_tag like CONCAT('%', #{keyword}, '%')
                 )
diff --git a/inlong-manager/manager-dao/src/test/java/org/apache/inlong/manager/dao/DaoBaseTest.java b/inlong-manager/manager-dao/src/test/java/org/apache/inlong/manager/dao/DaoBaseTest.java
index 9298d5df7..e2139100f 100644
--- a/inlong-manager/manager-dao/src/test/java/org/apache/inlong/manager/dao/DaoBaseTest.java
+++ b/inlong-manager/manager-dao/src/test/java/org/apache/inlong/manager/dao/DaoBaseTest.java
@@ -30,4 +30,5 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
 @SpringBootTest(classes = DaoBaseTest.class)
 @EnableWebMvc
 public abstract class DaoBaseTest extends BaseTest {
+
 }
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortServiceImpl.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortServiceImpl.java
index a7f30db83..562757f1f 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortServiceImpl.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortServiceImpl.java
@@ -17,16 +17,16 @@
 
 package org.apache.inlong.manager.service.core.impl;
 
+import com.google.gson.Gson;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.inlong.common.pojo.sdk.CacheZone;
 import org.apache.inlong.common.pojo.sdk.CacheZoneConfig;
-import org.apache.inlong.common.pojo.sortstandalone.SortClusterResponse;
 import org.apache.inlong.common.pojo.sdk.SortSourceConfigResponse;
+import org.apache.inlong.common.pojo.sortstandalone.SortClusterResponse;
 import org.apache.inlong.manager.service.core.SortClusterService;
-import org.apache.inlong.manager.service.core.SortSourceService;
 import org.apache.inlong.manager.service.core.SortService;
-import org.json.JSONObject;
+import org.apache.inlong.manager.service.core.SortSourceService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -41,26 +41,26 @@ import java.util.Map;
 public class SortServiceImpl implements SortService {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(SortServiceImpl.class);
+    private static final Gson GSON = new Gson();
 
     private static final int RESPONSE_CODE_SUCCESS = 0;
     private static final int RESPONSE_CODE_NO_UPDATE = 1;
     private static final int RESPONSE_CODE_FAIL = -1;
     private static final int RESPONSE_CODE_REQ_PARAMS_ERROR = -101;
 
+    @Autowired
+    private SortSourceService sortSourceService;
 
-    @Autowired private SortSourceService sortSourceService;
-
-    @Autowired private SortClusterService sortClusterService;
+    @Autowired
+    private SortClusterService sortClusterService;
 
     @Override
     public SortClusterResponse getClusterConfig(String clusterName, String md5) {
-
         return sortClusterService.getClusterConfig(clusterName, md5);
     }
 
     @Override
     public SortSourceConfigResponse getSourceConfig(String clusterName, String sortTaskId, String md5) {
-
         // check if clusterName and sortTaskId are null.
         if (StringUtils.isBlank(clusterName) || StringUtils.isBlank(sortTaskId)) {
             String errMsg = "Blank cluster name or task id, return nothing";
@@ -75,7 +75,7 @@ public class SortServiceImpl implements SortService {
         try {
             cacheZones = sortSourceService.getCacheZones(clusterName, sortTaskId);
         } catch (Exception e) {
-            String errMsg = "Got exception when get cache zones. " + e.getMessage();
+            String errMsg = "Get cache zones exception: " + e.getMessage();
             LOGGER.error(errMsg, e);
             return SortSourceConfigResponse.builder()
                     .msg(errMsg)
@@ -83,7 +83,7 @@ public class SortServiceImpl implements SortService {
                     .build();
         }
 
-        // if there is not any cacheZones;
+        // if there is not any cacheZones
         if (cacheZones.isEmpty()) {
             String errMsg = "There is not any cacheZones of cluster: " + clusterName
                     + " , task: " + sortTaskId
@@ -102,8 +102,8 @@ public class SortServiceImpl implements SortService {
                 .build();
 
         // no update
-        JSONObject jo = new JSONObject(data);
-        String localMd5 = DigestUtils.md5Hex(jo.toString());
+        String json = GSON.toJson(data);
+        String localMd5 = DigestUtils.md5Hex(json);
         if (md5.equals(localMd5)) {
             String msg = "Same md5, no update";
             return SortSourceConfigResponse.builder()
@@ -113,7 +113,7 @@ public class SortServiceImpl implements SortService {
                     .build();
         }
 
-        // normal response.
+        // normal response
         return SortSourceConfigResponse.builder()
                 .msg("success")
                 .code(RESPONSE_CODE_SUCCESS)
@@ -121,4 +121,5 @@ public class SortServiceImpl implements SortService {
                 .md5(localMd5)
                 .build();
     }
+
 }
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortSourceServiceImpl.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortSourceServiceImpl.java
index 0e5b07af9..5b3f9eeb7 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortSourceServiceImpl.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortSourceServiceImpl.java
@@ -18,7 +18,7 @@
 package org.apache.inlong.manager.service.core.impl;
 
 import com.google.gson.Gson;
-import jodd.util.StringUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.inlong.common.pojo.sdk.CacheZone;
 import org.apache.inlong.common.pojo.sdk.Topic;
 import org.apache.inlong.manager.dao.entity.SortSourceConfigEntity;
@@ -41,14 +41,14 @@ public class SortSourceServiceImpl implements SortSourceService {
     private static final String KEY_ZONE_SERVICE_URL = "serviceUrl";
     private static final String KEY_ZONE_AUTHENTICATION = "authentication";
     private static final String KEY_ZONE_TYPE = "zoneType";
+    private static final Gson GSON = new Gson();
 
     @Autowired
-    private SortSourceConfigEntityMapper sortSourceConfigEntityMapper;
+    private SortSourceConfigEntityMapper sortSourceConfigMapper;
 
     @Override
     public Map<String, CacheZone> getCacheZones(String clusterName, String taskName) {
-        List<SortSourceConfigEntity> configList =
-                sortSourceConfigEntityMapper.selectByClusterAndTask(clusterName, taskName);
+        List<SortSourceConfigEntity> configList = sortSourceConfigMapper.selectByClusterAndTask(clusterName, taskName);
 
         // group configs by zone name
         Map<String, List<SortSourceConfigEntity>> zoneConfigMap =
@@ -64,10 +64,10 @@ public class SortSourceServiceImpl implements SortSourceService {
      * Build one {@link CacheZone} from list of configs including zone config and configs of each topic.
      *
      * <p>
-     *     The way we differ zone config and topic config is
-     *     if the params <b>topic</b> in {@link SortSourceConfigEntity} is blank.
-     *     If topic is blank, it's the <b>zone config</b>,
-     *     otherwise, it's <b>topic config</b>.
+     * The way we differ zone config and topic config is
+     * if the params <b>topic</b> in {@link SortSourceConfigEntity} is blank.
+     * If topic is blank, it's the <b>zone config</b>,
+     * otherwise, it's <b>topic config</b>.
      * </p>
      *
      * @param configList List of configs.
@@ -77,23 +77,22 @@ public class SortSourceServiceImpl implements SortSourceService {
         // get list of Topic
         List<Topic> topicList
                 = configList.stream()
-                .filter(config -> StringUtil.isNotBlank(config.getTopic()))
+                .filter(config -> StringUtils.isNotBlank(config.getTopic()))
                 .map(this::toTopic)
                 .collect(Collectors.toList());
 
         // get zone config
         List<SortSourceConfigEntity> zoneConfigs
                 = configList.stream()
-                .filter(config -> StringUtil.isBlank(config.getTopic()))
+                .filter(config -> StringUtils.isBlank(config.getTopic()))
                 .collect(Collectors.toList());
 
         if (zoneConfigs.size() != 1) {
-            throw new IllegalStateException("The size of zone config should be 1, but found " +  zoneConfigs.size());
+            throw new IllegalStateException("The size of zone config should be 1, but found " + zoneConfigs.size());
         }
 
         SortSourceConfigEntity zoneConfig = zoneConfigs.get(0);
         Map<String, String> zoneProperties = this.jsonProperty2Map(zoneConfig.getExtParams());
-
         return CacheZone.builder()
                 .zoneName(zoneConfig.getZoneName())
                 .serviceUrl(zoneProperties.remove(KEY_ZONE_SERVICE_URL))
@@ -107,8 +106,8 @@ public class SortSourceServiceImpl implements SortSourceService {
     /**
      * Build one {@link Topic} from the corresponding config.
      *
-     * @param topicConfig Config of topic.
-     * @return Topic.
+     * @param topicConfig source config
+     * @return topic info
      */
     private Topic toTopic(SortSourceConfigEntity topicConfig) {
         Map<String, String> topicProperties = this.jsonProperty2Map(topicConfig.getExtParams());
@@ -127,7 +126,7 @@ public class SortSourceServiceImpl implements SortSourceService {
      * @return Properties in map format.
      */
     private Map<String, String> jsonProperty2Map(String jsonProperty) {
-        return new Gson().fromJson(jsonProperty, Map.class);
+        return GSON.fromJson(jsonProperty, Map.class);
     }
 
 }
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupService.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupService.java
index 09bbaf1f6..b72ad7bfa 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupService.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupService.java
@@ -64,19 +64,19 @@ public interface InlongGroupService {
     /**
      * Modify group information
      *
-     * @param groupInfo Group information that needs to be modified
-     * @param operator Operator name
-     * @return Inlong group id
+     * @param request inlong group request that needs to be modified
+     * @param operator name of operator
+     * @return inlong group id
      */
-    String update(@Valid @NotNull(message = "inlongGroupRequest must not be null") InlongGroupRequest groupInfo,
+    String update(@Valid @NotNull(message = "inlong group request cannot be null") InlongGroupRequest request,
             String operator);
 
     /**
      * Modify the status of the specified group
      *
-     * @param groupId Inlong group id
-     * @param status Modified status
-     * @param operator Current operator
+     * @param groupId inlong group id
+     * @param status modified status
+     * @param operator name of operator
      * @return whether succeed
      */
     boolean updateStatus(String groupId, Integer status, String operator);
@@ -85,7 +85,7 @@ public interface InlongGroupService {
      * Delete the group information of the specified group id
      *
      * @param groupId The group id that needs to be deleted
-     * @param operator Current operator
+     * @param operator name of operator
      * @return whether succeed
      */
     boolean delete(String groupId, String operator);
@@ -101,8 +101,8 @@ public interface InlongGroupService {
     /**
      * Query the group information of each status of the current user
      *
-     * @param operator Current operator
-     * @return Group status statistics
+     * @param operator name of operator
+     * @return inlong group status statistics
      */
     InlongGroupCountResponse countGroupByUser(String operator);
 
@@ -118,20 +118,19 @@ public interface InlongGroupService {
     /**
      * Save the group modified when the approval is passed
      *
-     * @param approveInfo Approval information
-     * @param operator Edit person's name
-     * @return whether succeed
+     * @param approveRequest approval information
+     * @param operator name of operator
      */
-    boolean updateAfterApprove(
-            @Valid @NotNull(message = "approveInfo must not be null") InlongGroupApproveRequest approveInfo,
+    void updateAfterApprove(
+            @Valid @NotNull(message = "approve request cannot be null") InlongGroupApproveRequest approveRequest,
             String operator);
 
     /**
      * Save or update extended information
      * <p/>First physically delete the existing extended information, and then add this batch of extended information
      *
-     * @param groupId Group id
-     * @param infoList Ext info list
+     * @param groupId inlong group id
+     * @param infoList inlong group ext info list
      */
     void saveOrUpdateExt(String groupId, List<InlongGroupExtInfo> infoList);
 
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
index c17912c23..26bc00dfa 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/group/InlongGroupServiceImpl.java
@@ -349,24 +349,23 @@ public class InlongGroupServiceImpl implements InlongGroupService {
 
     @Override
     @Transactional(rollbackFor = Throwable.class, propagation = Propagation.REQUIRES_NEW)
-    public boolean updateAfterApprove(InlongGroupApproveRequest approveInfo, String operator) {
-        LOGGER.debug("begin to update inlong group after approve={}", approveInfo);
-        String groupId = approveInfo.getInlongGroupId();
+    public void updateAfterApprove(InlongGroupApproveRequest approveRequest, String operator) {
+        LOGGER.debug("begin to update inlong group after approve={}", approveRequest);
+        String groupId = approveRequest.getInlongGroupId();
 
         // update status to [GROUP_APPROVE_PASSED]
         this.updateStatus(groupId, GroupStatus.APPROVE_PASSED.getCode(), operator);
 
         // update other info for inlong group after approve
-        if (StringUtils.isNotBlank(approveInfo.getInlongClusterTag())) {
+        if (StringUtils.isNotBlank(approveRequest.getInlongClusterTag())) {
             InlongGroupEntity entity = new InlongGroupEntity();
-            entity.setInlongGroupId(approveInfo.getInlongGroupId());
-            entity.setInlongClusterTag(approveInfo.getInlongClusterTag());
+            entity.setInlongGroupId(approveRequest.getInlongGroupId());
+            entity.setInlongClusterTag(approveRequest.getInlongClusterTag());
             entity.setModifier(operator);
             groupMapper.updateByIdentifierSelective(entity);
         }
 
         LOGGER.info("success to update inlong group status after approve for groupId={}", groupId);
-        return true;
     }
 
     @Override
diff --git a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/common/utils/ValidationUtilsTest.java b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/common/utils/ValidationUtilsTest.java
index e46c07081..5ea34ca82 100644
--- a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/common/utils/ValidationUtilsTest.java
+++ b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/common/utils/ValidationUtilsTest.java
@@ -42,7 +42,7 @@ class ValidationUtilsTest extends ServiceBaseTest {
                 ConstraintViolationException.class,
                 () -> ValidationUtils.validate(validator, new ClusterTagRequest(), UpdateValidation.class));
 
-        Assertions.assertTrue(violationException.getMessage().contains("id: id must not be null"));
+        Assertions.assertTrue(violationException.getMessage().contains("id cannot be null"));
     }
 
     @Test
@@ -51,7 +51,7 @@ class ValidationUtilsTest extends ServiceBaseTest {
                 ConstraintViolationException.class,
                 () -> ValidationUtils.validate(validator, new ClusterTagRequest()));
 
-        Assertions.assertEquals("clusterTag: clusterTag cannot be blank", violationException.getMessage());
+        Assertions.assertTrue(violationException.getMessage().contains("clusterTag cannot be blank"));
     }
 
 }
diff --git a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/group/GroupServiceTest.java b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/group/GroupServiceTest.java
index 7560dacb5..e5835d303 100644
--- a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/group/GroupServiceTest.java
+++ b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/group/GroupServiceTest.java
@@ -40,8 +40,8 @@ class GroupServiceTest extends ServiceBaseTest {
                 ConstraintViolationException.class,
                 () -> groupService.update(new InlongTubeRequest(), ""));
 
-        Assertions.assertTrue(exception.getMessage().contains("inCharges: inCharges must not be blank"));
-        Assertions.assertTrue(exception.getMessage().contains("inlongGroupId: inlongGroupId cannot be blank"));
+        Assertions.assertTrue(exception.getMessage().contains("inCharges cannot be blank"));
+        Assertions.assertTrue(exception.getMessage().contains("inlongGroupId cannot be blank"));
     }
 
     @Test
@@ -49,8 +49,8 @@ class GroupServiceTest extends ServiceBaseTest {
         ConstraintViolationException exception = Assertions.assertThrows(ConstraintViolationException.class,
                 () -> groupService.updateAfterApprove(new InlongGroupApproveRequest(), ""));
 
-        Assertions.assertTrue(exception.getMessage().contains("mqType: mqType must not be blank"));
-        Assertions.assertTrue(exception.getMessage().contains("inlongGroupId: inlongGroupId must not be blank"));
+        Assertions.assertTrue(exception.getMessage().contains("mqType cannot be blank"));
+        Assertions.assertTrue(exception.getMessage().contains("inlongGroupId cannot be blank"));
 
     }
 }