You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "zzxxiansheng (via GitHub)" <gi...@apache.org> on 2024/01/29 14:27:04 UTC
[PR] [#26]Add, delete, modify, and search the basic tables of Topic, Group, GroupMember, and Operation. Minor changes to the table structure [eventmesh-dashboard]
zzxxiansheng opened a new pull request, #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1477988983
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/linkage/log/TestOprLog.java:
##########
@@ -0,0 +1,43 @@
+package org.apache.eventmesh.dashboard.console.linkage.log;
+
+import org.apache.eventmesh.dashboard.console.EventMeshDashboardApplication;
+import org.apache.eventmesh.dashboard.console.entity.group.GroupEntity;
+import org.apache.eventmesh.dashboard.console.entity.log.LogEntity;
+import org.apache.eventmesh.dashboard.console.service.group.GroupService;
+import org.apache.eventmesh.dashboard.console.service.log.LogService;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = EventMeshDashboardApplication.class)
+public class TestOprLog {
+
+ @Autowired
+ private GroupService groupService;
+
+ @Autowired
+ private LogService logService;
+
+ @Test
+ public void test_groupService_OprLog() {
+ GroupEntity groupEntity = new GroupEntity(null, 1L, "logTest", 0, null, 1, "OK", null, null);
Review Comment:
yep, that's fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "zzxxiansheng (via GitHub)" <gi...@apache.org>.
zzxxiansheng commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1477964249
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/unit/group/TestGroupMapper.java:
##########
@@ -0,0 +1,102 @@
+package org.apache.eventmesh.dashboard.console.unit.group;
+
+import org.apache.eventmesh.dashboard.console.EventMeshDashboardApplication;
+
+import org.apache.eventmesh.dashboard.console.entity.group.GroupEntity;
+import org.apache.eventmesh.dashboard.console.mapper.group.OprGroupMapper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = EventMeshDashboardApplication.class)
+public class TestGroupMapper {
+
+ @Autowired
+ private OprGroupMapper groupMapper;
+
+ public List<GroupEntity> insertGroupData(String name) {
+ List<GroupEntity> groupEntities = new ArrayList<>();
+ for (int i = 0; i < 10; i++) {
+ GroupEntity groupEntity = new GroupEntity(null, (long) i, name, 0, null, 1, "OK", null, null);
+ groupMapper.addGroup(groupEntity);
+ groupEntities.add(groupEntity);
+ }
+ return groupEntities;
+ }
+
+ public List<GroupEntity> getRemovedTimeList(String name) {
+ GroupEntity groupEntity = new GroupEntity();
+ groupEntity.setName(name);
+ List<GroupEntity> groupEntities = groupMapper.selectGroupByDynamic(groupEntity);
+ for (GroupEntity groupEntity1 : groupEntities) {
+ groupEntity1.setCreateTime(null);
+ groupEntity1.setUpdateTime(null);
+ }
+ return groupEntities;
+ }
+
+ @Test
+ public void test_addGroup() {
+ List<GroupEntity> groupEntities = this.insertGroupData("addGroup");
+ GroupEntity groupEntity = new GroupEntity();
+ groupEntity.setName("addGroup");
+ List<GroupEntity> groupEntities1 = groupMapper.selectGroupByDynamic(groupEntity);
+ Assert.assertEquals(groupEntities, this.getRemovedTimeList("addGroup"));
+ }
+
+ @Test
+ public void test_updateGroupById() {
+ List<GroupEntity> groupEntities = this.insertGroupData("updateById2");
+ GroupEntity groupEntity = groupEntities.get(9);
+ groupEntity.setType(3);
+ groupEntity.setMembers("1,");
+ groupEntity.setState("fail");
+ groupEntity.setMemberCount(1);
+ groupMapper.updateGroup(groupEntity);
+ Assert.assertEquals(groupEntities, this.getRemovedTimeList("updateById2"));
+ }
+
+ @Test
+ public void test_deleteGroupById() {
+ List<GroupEntity> groupEntities = this.insertGroupData("deleteById");
+ GroupEntity groupEntity = groupEntities.get(9);
+ groupMapper.deleteGroup(groupEntity);
+ groupEntities.remove(9);
+ Assert.assertEquals(groupEntities, this.getRemovedTimeList("deleteById"));
+ }
+
+ @Test
+ public void test_selectGroupById() {
+ List<GroupEntity> groupEntities = this.insertGroupData("selectById");
+ GroupEntity groupEntity = groupMapper.selectGroupById(groupEntities.get(0));
+ groupEntity.setCreateTime(null);
+ groupEntity.setUpdateTime(null);
+ Assert.assertEquals(groupEntities.get(0), groupEntity);
+ }
+
+ @Test
+ public void test_selectGroupByClusterId() {
+ List<GroupEntity> groupEntities = this.insertGroupData("selectByUnique");
+ GroupEntity groupEntity1 = new GroupEntity();
+ groupEntity1.setClusterId(groupEntities.get(0).getClusterId());
+ groupEntity1.setName(groupEntities.get(0).getName());
+ GroupEntity groupEntity = groupMapper.selectGroupByUnique(groupEntity1);
+ groupEntity.setCreateTime(null);
+ groupEntity.setUpdateTime(null);
+ Assert.assertEquals(groupEntities.get(0), groupEntity);
+ }
+
+ @Test
+ public void test_selectGroupByDynamic() {
+ List<GroupEntity> groupEntities = this.insertGroupData("selectByDynamic1");
Review Comment:
'Dynamic' means 动态sql 的动态
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1477891810
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/unit/group/TestGroupDao.java:
##########
Review Comment:
It seems the test classes haven't been renamed to Mapper.
##########
eventmesh-dashboard-console/src/main/resources/application-dev.yml:
##########
@@ -46,10 +44,9 @@ spring:
test-while-idle: true
min-evictable-idle-time-millis: 300000
-mybatis:
- type-aliases-package: org.apache.eventmesh.dashboard.console.entity
-
-
-
Review Comment:
Are you sure you want to remove this configuration?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1477950684
##########
eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/topic/TopicServiceImpl.java:
##########
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.console.service.topic;
+
+import org.apache.eventmesh.dashboard.console.entity.groupmember.GroupMemberEntity;
+import org.apache.eventmesh.dashboard.console.entity.topic.TopicEntity;
+import org.apache.eventmesh.dashboard.console.mapper.groupmember.OprGroupMemberMapper;
+import org.apache.eventmesh.dashboard.console.mapper.topic.TopicMapper;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class TopicServiceImpl implements TopicService {
+
+ @Autowired
+ TopicMapper topicMapper;
+
+ @Autowired
+ OprGroupMemberMapper oprGroupMemberMapper;
+
+
+ @Override
+ public List<TopicEntity> getTopicList(TopicEntity topicEntity) {
+ return topicMapper.getTopicListByDynamic(topicEntity);
+ }
+
+ @Override
+ public void addTopic_plus(TopicEntity topicEntity) {
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setTopicName(topicEntity.getTopicName());
+ groupMemberEntity.setState("active");
+ oprGroupMemberMapper.updateMemberByTopic(groupMemberEntity);
+ topicMapper.addTopic(topicEntity);
+ }
+
+ @Override
+ public void updateTopic(TopicEntity topicEntity) {
+ topicMapper.updateTopic(topicEntity);
+ }
+
+ @Override
+ public void deleteTopic(TopicEntity topicEntity) {
+ topicMapper.deleteTopic(topicEntity);
+ }
+
+ @Override
+ public TopicEntity selectTopicById(TopicEntity topicEntity) {
+ return topicMapper.selectTopicById(topicEntity);
+ }
+
+ @Override
+ public TopicEntity selectTopicByUnique(TopicEntity topicEntity) {
+ return topicMapper.selectTopicByUnique(topicEntity);
+ }
+
+ @Override
+ public void deleteTopic_plus(TopicEntity topicEntity) {
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
Review Comment:
Such naming is not a good practise.
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/unit/group/TestGroupMapper.java:
##########
@@ -0,0 +1,102 @@
+package org.apache.eventmesh.dashboard.console.unit.group;
+
+import org.apache.eventmesh.dashboard.console.EventMeshDashboardApplication;
+
+import org.apache.eventmesh.dashboard.console.entity.group.GroupEntity;
+import org.apache.eventmesh.dashboard.console.mapper.group.OprGroupMapper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = EventMeshDashboardApplication.class)
+public class TestGroupMapper {
+
+ @Autowired
+ private OprGroupMapper groupMapper;
+
+ public List<GroupEntity> insertGroupData(String name) {
+ List<GroupEntity> groupEntities = new ArrayList<>();
+ for (int i = 0; i < 10; i++) {
+ GroupEntity groupEntity = new GroupEntity(null, (long) i, name, 0, null, 1, "OK", null, null);
+ groupMapper.addGroup(groupEntity);
+ groupEntities.add(groupEntity);
+ }
+ return groupEntities;
+ }
+
+ public List<GroupEntity> getRemovedTimeList(String name) {
+ GroupEntity groupEntity = new GroupEntity();
+ groupEntity.setName(name);
+ List<GroupEntity> groupEntities = groupMapper.selectGroupByDynamic(groupEntity);
+ for (GroupEntity groupEntity1 : groupEntities) {
+ groupEntity1.setCreateTime(null);
+ groupEntity1.setUpdateTime(null);
+ }
+ return groupEntities;
+ }
+
+ @Test
+ public void test_addGroup() {
+ List<GroupEntity> groupEntities = this.insertGroupData("addGroup");
+ GroupEntity groupEntity = new GroupEntity();
+ groupEntity.setName("addGroup");
+ List<GroupEntity> groupEntities1 = groupMapper.selectGroupByDynamic(groupEntity);
+ Assert.assertEquals(groupEntities, this.getRemovedTimeList("addGroup"));
+ }
+
+ @Test
+ public void test_updateGroupById() {
+ List<GroupEntity> groupEntities = this.insertGroupData("updateById2");
+ GroupEntity groupEntity = groupEntities.get(9);
+ groupEntity.setType(3);
+ groupEntity.setMembers("1,");
+ groupEntity.setState("fail");
+ groupEntity.setMemberCount(1);
+ groupMapper.updateGroup(groupEntity);
+ Assert.assertEquals(groupEntities, this.getRemovedTimeList("updateById2"));
+ }
+
+ @Test
+ public void test_deleteGroupById() {
+ List<GroupEntity> groupEntities = this.insertGroupData("deleteById");
+ GroupEntity groupEntity = groupEntities.get(9);
+ groupMapper.deleteGroup(groupEntity);
+ groupEntities.remove(9);
+ Assert.assertEquals(groupEntities, this.getRemovedTimeList("deleteById"));
+ }
+
+ @Test
+ public void test_selectGroupById() {
+ List<GroupEntity> groupEntities = this.insertGroupData("selectById");
+ GroupEntity groupEntity = groupMapper.selectGroupById(groupEntities.get(0));
+ groupEntity.setCreateTime(null);
+ groupEntity.setUpdateTime(null);
+ Assert.assertEquals(groupEntities.get(0), groupEntity);
+ }
+
+ @Test
+ public void test_selectGroupByClusterId() {
+ List<GroupEntity> groupEntities = this.insertGroupData("selectByUnique");
+ GroupEntity groupEntity1 = new GroupEntity();
+ groupEntity1.setClusterId(groupEntities.get(0).getClusterId());
+ groupEntity1.setName(groupEntities.get(0).getName());
+ GroupEntity groupEntity = groupMapper.selectGroupByUnique(groupEntity1);
+ groupEntity.setCreateTime(null);
+ groupEntity.setUpdateTime(null);
+ Assert.assertEquals(groupEntities.get(0), groupEntity);
+ }
+
+ @Test
+ public void test_selectGroupByDynamic() {
+ List<GroupEntity> groupEntities = this.insertGroupData("selectByDynamic1");
Review Comment:
What does the `Dynamic` here mean?
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/linkage/log/TestOprLog.java:
##########
@@ -0,0 +1,43 @@
+package org.apache.eventmesh.dashboard.console.linkage.log;
+
+import org.apache.eventmesh.dashboard.console.EventMeshDashboardApplication;
+import org.apache.eventmesh.dashboard.console.entity.group.GroupEntity;
+import org.apache.eventmesh.dashboard.console.entity.log.LogEntity;
+import org.apache.eventmesh.dashboard.console.service.group.GroupService;
+import org.apache.eventmesh.dashboard.console.service.log.LogService;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = EventMeshDashboardApplication.class)
+public class TestOprLog {
+
+ @Autowired
+ private GroupService groupService;
+
+ @Autowired
+ private LogService logService;
+
+ @Test
+ public void test_groupService_OprLog() {
+ GroupEntity groupEntity = new GroupEntity(null, 1L, "logTest", 0, null, 1, "OK", null, null);
Review Comment:
Please follow the CamelCase naming convension.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "zzxxiansheng (via GitHub)" <gi...@apache.org>.
zzxxiansheng commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1477960362
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/linkage/log/TestOprLog.java:
##########
@@ -0,0 +1,43 @@
+package org.apache.eventmesh.dashboard.console.linkage.log;
+
+import org.apache.eventmesh.dashboard.console.EventMeshDashboardApplication;
+import org.apache.eventmesh.dashboard.console.entity.group.GroupEntity;
+import org.apache.eventmesh.dashboard.console.entity.log.LogEntity;
+import org.apache.eventmesh.dashboard.console.service.group.GroupService;
+import org.apache.eventmesh.dashboard.console.service.log.LogService;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = EventMeshDashboardApplication.class)
+public class TestOprLog {
+
+ @Autowired
+ private GroupService groupService;
+
+ @Autowired
+ private LogService logService;
+
+ @Test
+ public void test_groupService_OprLog() {
+ GroupEntity groupEntity = new GroupEntity(null, 1L, "logTest", 0, null, 1, "OK", null, null);
Review Comment:
just like change to 'testGroupServiceOprLog'?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1478422940
##########
eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/topic/TopicMapper.java:
##########
@@ -35,8 +35,8 @@
@Mapper
public interface TopicMapper {
-
- @Select("<script>"
+ @Select(
+ "<script>"
+ "select * from topic"
Review Comment:
I think the change made here is innecessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1478081903
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/unit/groupmember/testGroupMemberMapper.java:
##########
@@ -0,0 +1,141 @@
+package org.apache.eventmesh.dashboard.console.unit.groupmember;
+
+import org.apache.eventmesh.dashboard.console.EventMeshDashboardApplication;
+import org.apache.eventmesh.dashboard.console.entity.groupmember.GroupMemberEntity;
+import org.apache.eventmesh.dashboard.console.mapper.groupmember.OprGroupMemberMapper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = EventMeshDashboardApplication.class)
+public class testGroupMemberMapper {
+
+ @Autowired
+ OprGroupMemberMapper groupMemberMapper;
+
+ public List<GroupMemberEntity> insertGroupData(String topicName, String groupName) {
+ List<GroupMemberEntity> groupMemberEntities = new ArrayList<>();
+ for (int i = 0; i < 10; i++) {
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity(null, (long) i, topicName, groupName, "admin", "active", null, null);
+ groupMemberMapper.addGroupMember(groupMemberEntity);
+ groupMemberEntities.add(groupMemberEntity);
+ }
+ return groupMemberEntities;
+ }
+
+ public List<GroupMemberEntity> getRemovedTimeList(String topicName, String groupName) {
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setTopicName(topicName);
+ groupMemberEntity.setGroupName(groupName);
+ List<GroupMemberEntity> groupEntities = groupMemberMapper.selectAllMemberByDynamic(groupMemberEntity);
+ for (GroupMemberEntity groupEntity1 : groupEntities) {
+ groupEntity1.setCreateTime(null);
+ groupEntity1.setUpdateTime(null);
+ }
+ return groupEntities;
+ }
+
+ @Test
+ public void test_addGroupMember() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("add1", "groupMember");
+ Assert.assertEquals(add1, this.getRemovedTimeList("add1", "groupMember"));
+ }
+
+ @Test
+ public void test_getGroupMemberByClusterId() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("getByCluster", "groupMember");
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setClusterId(add1.get(1).getClusterId());
+ List<GroupMemberEntity> groupByClusterId = groupMemberMapper.getGroupByClusterId(groupMemberEntity);
+ GroupMemberEntity groupMemberEntity1 = groupByClusterId.get(0);
+ groupMemberEntity1.setCreateTime(null);
+ groupMemberEntity1.setUpdateTime(null);
+ Assert.assertEquals(1, groupByClusterId.size());
+ Assert.assertEquals(add1.get(1), groupMemberEntity1);
+ }
+
+ @Test
+ public void test_deleteGroupMemberById() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("getById", "groupMember");
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setId(add1.get(2).getId());
+ GroupMemberEntity groupMemberEntity1 = groupMemberMapper.selectGroupMemberById(groupMemberEntity);
+ groupMemberEntity1.setUpdateTime(null);
+ groupMemberEntity1.setCreateTime(null);
+ Assert.assertEquals(groupMemberEntity1, add1.get(2));
+ }
+
+ @Test
+ public void test_updateGroupMemberById() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("updateById", "groupMember");
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ add1.get(1).setState("fail1");
+ groupMemberEntity.setState("fail1");
+ groupMemberEntity.setId(add1.get(1).getId());
+ groupMemberMapper.updateGroupMember(groupMemberEntity);
+ GroupMemberEntity groupMemberEntity1 = groupMemberMapper.selectGroupMemberById(add1.get(1));
+ groupMemberEntity1.setUpdateTime(null);
+ groupMemberEntity1.setCreateTime(null);
Review Comment:
How about just not calling its setter?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [#26]Add, delete, modify, and search the basic tables of Topic, Group, GroupMember, and Operation. Minor changes to the table structure [eventmesh-dashboard]
Posted by "zzxxiansheng (via GitHub)" <gi...@apache.org>.
zzxxiansheng commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1474330090
##########
pom.xml:
##########
@@ -104,37 +103,6 @@
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring-boot.version}</version>
</dependency>
- <dependency>
- <groupId>org.mybatis.spring.boot</groupId>
- <artifactId>mybatis-spring-boot-starter-test</artifactId>
- <version>${mybatis-spring-boot.version}</version>
- </dependency>
</dependencies>
</dependencyManagement>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.3.1</version>
- <configuration>
- <configLocation>style/checkStyle.xml</configLocation>
- <consoleOutput>true</consoleOutput>
- <failsOnError>true</failsOnError>
- <linkXRef>false</linkXRef>
- <propertyExpansion>config_loc=style</propertyExpansion>
- </configuration>
- <executions>
- <execution>
- <id>validate</id>
- <phase>validate</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
Review Comment:
I have received it and will revise and submit it again as soon as possible
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1478398184
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/unit/group/TestGroupMapper.java:
##########
@@ -95,7 +95,7 @@ public void test_selectGroupByClusterId() {
}
@Test
- public void test_selectGroupByDynamic() {
+ public void testSelectGroupByDynamic() {
List<GroupEntity> groupEntities = this.insertGroupData("selectByDynamic1");
Review Comment:
Why `Dynamic` is retained?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] Add, delete, modify, and search the basic tables of Topic, Group, GroupMember, and Operation. Minor changes to the table structure [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1477882143
##########
eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java:
##########
Review Comment:
Please refer https://github.com/apache/eventmesh-dashboard/pull/22#discussion_r1467459119
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "zzxxiansheng (via GitHub)" <gi...@apache.org>.
zzxxiansheng commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1478060055
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/unit/groupmember/testGroupMemberMapper.java:
##########
@@ -0,0 +1,141 @@
+package org.apache.eventmesh.dashboard.console.unit.groupmember;
+
+import org.apache.eventmesh.dashboard.console.EventMeshDashboardApplication;
+import org.apache.eventmesh.dashboard.console.entity.groupmember.GroupMemberEntity;
+import org.apache.eventmesh.dashboard.console.mapper.groupmember.OprGroupMemberMapper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = EventMeshDashboardApplication.class)
+public class testGroupMemberMapper {
+
+ @Autowired
+ OprGroupMemberMapper groupMemberMapper;
+
+ public List<GroupMemberEntity> insertGroupData(String topicName, String groupName) {
+ List<GroupMemberEntity> groupMemberEntities = new ArrayList<>();
+ for (int i = 0; i < 10; i++) {
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity(null, (long) i, topicName, groupName, "admin", "active", null, null);
+ groupMemberMapper.addGroupMember(groupMemberEntity);
+ groupMemberEntities.add(groupMemberEntity);
+ }
+ return groupMemberEntities;
+ }
+
+ public List<GroupMemberEntity> getRemovedTimeList(String topicName, String groupName) {
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setTopicName(topicName);
+ groupMemberEntity.setGroupName(groupName);
+ List<GroupMemberEntity> groupEntities = groupMemberMapper.selectAllMemberByDynamic(groupMemberEntity);
+ for (GroupMemberEntity groupEntity1 : groupEntities) {
+ groupEntity1.setCreateTime(null);
+ groupEntity1.setUpdateTime(null);
+ }
+ return groupEntities;
+ }
+
+ @Test
+ public void test_addGroupMember() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("add1", "groupMember");
+ Assert.assertEquals(add1, this.getRemovedTimeList("add1", "groupMember"));
+ }
+
+ @Test
+ public void test_getGroupMemberByClusterId() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("getByCluster", "groupMember");
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setClusterId(add1.get(1).getClusterId());
+ List<GroupMemberEntity> groupByClusterId = groupMemberMapper.getGroupByClusterId(groupMemberEntity);
+ GroupMemberEntity groupMemberEntity1 = groupByClusterId.get(0);
+ groupMemberEntity1.setCreateTime(null);
+ groupMemberEntity1.setUpdateTime(null);
+ Assert.assertEquals(1, groupByClusterId.size());
+ Assert.assertEquals(add1.get(1), groupMemberEntity1);
+ }
+
+ @Test
+ public void test_deleteGroupMemberById() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("getById", "groupMember");
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setId(add1.get(2).getId());
+ GroupMemberEntity groupMemberEntity1 = groupMemberMapper.selectGroupMemberById(groupMemberEntity);
+ groupMemberEntity1.setUpdateTime(null);
+ groupMemberEntity1.setCreateTime(null);
+ Assert.assertEquals(groupMemberEntity1, add1.get(2));
+ }
+
+ @Test
+ public void test_updateGroupMemberById() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("updateById", "groupMember");
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ add1.get(1).setState("fail1");
+ groupMemberEntity.setState("fail1");
+ groupMemberEntity.setId(add1.get(1).getId());
+ groupMemberMapper.updateGroupMember(groupMemberEntity);
+ GroupMemberEntity groupMemberEntity1 = groupMemberMapper.selectGroupMemberById(add1.get(1));
+ groupMemberEntity1.setUpdateTime(null);
+ groupMemberEntity1.setCreateTime(null);
Review Comment:
This is because the expected results are created and updated at the same time as the actual database. Moreover, these two fields are set by default when creating and updating, so there is no need to check them. So in order to set them up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [#26]Add, delete, modify, and search the basic tables of Topic, Group, GroupMember, and Operation. Minor changes to the table structure [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1474022847
##########
eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java:
##########
Review Comment:
Why this class is added again?
##########
eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/OprGroupDao.java:
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.console.mapper;
+
+import org.apache.eventmesh.dashboard.console.entity.GroupEntity;
+
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Insert;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+
+import java.util.List;
+
+/**
+operate Group mapper
+ **/
+@Mapper
+public interface OprGroupDao {
+ @Select("select * from `group` where cluster_id=#{clusterId}")
Review Comment:
Naming it `Mapper` instead of `Dao` fits Mybatis style better.
##########
eventmesh-dashboard-service/pom.xml:
##########
@@ -18,4 +18,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
+ <dependencies>
+
+ </dependencies>
+
</project>
Review Comment:
redundant xml label.
##########
pom.xml:
##########
@@ -104,37 +103,6 @@
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring-boot.version}</version>
</dependency>
- <dependency>
- <groupId>org.mybatis.spring.boot</groupId>
- <artifactId>mybatis-spring-boot-starter-test</artifactId>
- <version>${mybatis-spring-boot.version}</version>
- </dependency>
</dependencies>
</dependencyManagement>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.3.1</version>
- <configuration>
- <configLocation>style/checkStyle.xml</configLocation>
- <consoleOutput>true</consoleOutput>
- <failsOnError>true</failsOnError>
- <linkXRef>false</linkXRef>
- <propertyExpansion>config_loc=style</propertyExpansion>
- </configuration>
- <executions>
- <execution>
- <id>validate</id>
- <phase>validate</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
Review Comment:
It seems you choosed to remain your edition when addressing git conflicts. Please re-merge and retain the changes made in `dev` branch.
##########
eventmesh-dashboard-console/src/main/resources/application-dev.yml:
##########
@@ -44,9 +46,10 @@ spring:
test-while-idle: true
min-evictable-idle-time-millis: 300000
-# cron job config, use cron expression
-cron:
- #health check job
- health: "0/15 * * * * ? *"
+mybatis:
+ type-aliases-package: org.apache.eventmesh.dashboard.console.entity
+
+
+
Review Comment:
Are you sure to delete code added in #22?
##########
eventmesh-dashboard-console/src/main/resources/application-dev.yml:
##########
@@ -17,6 +17,8 @@
server:
port: 9898
+ servlet:
+ context-path: "/eventmesh"
Review Comment:
This was deleted in #22. Are you sure to add it back?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1477996250
##########
eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/topic/TopicMapper.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.eventmesh.dashboard.console.mapper.topic;
+
+
+import org.apache.eventmesh.dashboard.console.entity.topic.TopicEntity;
+
+import org.apache.ibatis.annotations.Delete;
+import org.apache.ibatis.annotations.Insert;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Options;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+
+import java.util.List;
+
+/**
+ * operate Topic mapper
+ **/
+@Mapper
+public interface TopicMapper {
+
+
+ @Select("<script>"
+ + "select * from topic"
+ + "<where>"
+ + "<if test='topicName!=null'>"
+ + "and topic_name=#{topicName}"
+ + "</if>"
+ + "<if test='clusterId!=null'>"
+ + "and cluster_id=#{clusterId} "
+ + "</if>"
+ + "and is_delete=0"
+ + "</where>"
+ + "</script>")
+ List<TopicEntity> getTopicListByDynamic(TopicEntity topicEntity);
Review Comment:
`ByDynamic` seems strange because `Dynamic` is not an entity.
By the way, is there a way to write xml with Indentation?
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/unit/groupmember/testGroupMemberMapper.java:
##########
@@ -0,0 +1,141 @@
+package org.apache.eventmesh.dashboard.console.unit.groupmember;
+
+import org.apache.eventmesh.dashboard.console.EventMeshDashboardApplication;
+import org.apache.eventmesh.dashboard.console.entity.groupmember.GroupMemberEntity;
+import org.apache.eventmesh.dashboard.console.mapper.groupmember.OprGroupMemberMapper;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = EventMeshDashboardApplication.class)
+public class testGroupMemberMapper {
+
+ @Autowired
+ OprGroupMemberMapper groupMemberMapper;
+
+ public List<GroupMemberEntity> insertGroupData(String topicName, String groupName) {
+ List<GroupMemberEntity> groupMemberEntities = new ArrayList<>();
+ for (int i = 0; i < 10; i++) {
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity(null, (long) i, topicName, groupName, "admin", "active", null, null);
+ groupMemberMapper.addGroupMember(groupMemberEntity);
+ groupMemberEntities.add(groupMemberEntity);
+ }
+ return groupMemberEntities;
+ }
+
+ public List<GroupMemberEntity> getRemovedTimeList(String topicName, String groupName) {
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setTopicName(topicName);
+ groupMemberEntity.setGroupName(groupName);
+ List<GroupMemberEntity> groupEntities = groupMemberMapper.selectAllMemberByDynamic(groupMemberEntity);
+ for (GroupMemberEntity groupEntity1 : groupEntities) {
+ groupEntity1.setCreateTime(null);
+ groupEntity1.setUpdateTime(null);
+ }
+ return groupEntities;
+ }
+
+ @Test
+ public void test_addGroupMember() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("add1", "groupMember");
+ Assert.assertEquals(add1, this.getRemovedTimeList("add1", "groupMember"));
+ }
+
+ @Test
+ public void test_getGroupMemberByClusterId() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("getByCluster", "groupMember");
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setClusterId(add1.get(1).getClusterId());
+ List<GroupMemberEntity> groupByClusterId = groupMemberMapper.getGroupByClusterId(groupMemberEntity);
+ GroupMemberEntity groupMemberEntity1 = groupByClusterId.get(0);
+ groupMemberEntity1.setCreateTime(null);
+ groupMemberEntity1.setUpdateTime(null);
+ Assert.assertEquals(1, groupByClusterId.size());
+ Assert.assertEquals(add1.get(1), groupMemberEntity1);
+ }
+
+ @Test
+ public void test_deleteGroupMemberById() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("getById", "groupMember");
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ groupMemberEntity.setId(add1.get(2).getId());
+ GroupMemberEntity groupMemberEntity1 = groupMemberMapper.selectGroupMemberById(groupMemberEntity);
+ groupMemberEntity1.setUpdateTime(null);
+ groupMemberEntity1.setCreateTime(null);
+ Assert.assertEquals(groupMemberEntity1, add1.get(2));
+ }
+
+ @Test
+ public void test_updateGroupMemberById() {
+ List<GroupMemberEntity> add1 = this.insertGroupData("updateById", "groupMember");
+ GroupMemberEntity groupMemberEntity = new GroupMemberEntity();
+ add1.get(1).setState("fail1");
+ groupMemberEntity.setState("fail1");
+ groupMemberEntity.setId(add1.get(1).getId());
+ groupMemberMapper.updateGroupMember(groupMemberEntity);
+ GroupMemberEntity groupMemberEntity1 = groupMemberMapper.selectGroupMemberById(add1.get(1));
+ groupMemberEntity1.setUpdateTime(null);
+ groupMemberEntity1.setCreateTime(null);
Review Comment:
Why `updateTime` and `createTime` should be `null`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia merged PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org
Re: [PR] [ISSUE #26] CRUD the basic tables of Topic, Group, GroupMember, and Operation [eventmesh-dashboard]
Posted by "Pil0tXia (via GitHub)" <gi...@apache.org>.
Pil0tXia commented on code in PR #28:
URL: https://github.com/apache/eventmesh-dashboard/pull/28#discussion_r1478393384
##########
eventmesh-dashboard-console/src/main/resources/eventmesh-dashboard.sql:
##########
@@ -61,11 +61,11 @@ CREATE TABLE `operation_log`
`cluster_id` bigint NOT NULL DEFAULT '-1' COMMENT '物理集群ID',
`operation_type` varchar(192) NOT NULL DEFAULT '' COMMENT '操作类型,如:启动,停止,重启,添加,删除,修改',
`status` int NOT NULL DEFAULT '0' COMMENT '操作状态 0:未知,1:执行中,2:成功,3:失败',
- `description` text COMMENT '备注信息',
+ `contain` text COMMENT '备注信息',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
Review Comment:
It should be `content`.
##########
eventmesh-dashboard-console/src/test/java/org/apache/eventmesh/dashboard/console/unit/group/TestGroupMapper.java:
##########
@@ -95,7 +95,7 @@ public void test_selectGroupByClusterId() {
}
@Test
- public void test_selectGroupByDynamic() {
+ public void testSelectGroupByDynamic() {
List<GroupEntity> groupEntities = this.insertGroupData("selectByDynamic1");
Review Comment:
Why `Dynamic` is remained?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org