Skip to content

Commit

Permalink
[HOTFIX] socket bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ohksj77 committed Jan 19, 2024
1 parent 9c68e0b commit 03d2583
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class GroupMember implements Auditable {
public GroupMember(Group group, Member member) {
this.group = group;
this.member = member;
this.isShare = true;
this.isShare = false;
member.addGroupMember(this);
this.groupInviteCode = GroupInviteCode.REQUESTED;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@ public interface GroupMapper {
@Mapping(target = "groupImage", source = "groupDto.groupImage")
Group toGroupEntity(MakeGroupRequest groupDto, Member leader);

@Named("groupMemberToMemberResponse")
@Mapping(target = "memberId", source = "groupMember.member.id")
@Mapping(target = "nickname", source = "groupMember.member.nickname")
@Mapping(target = "profileImage", source = "groupMember.member.profileImage")
@Mapping(target = "isShare", source = "groupMember.isShare")
GroupMemberResponse toGroupMemberResponse(GroupMember groupMember);

@Named("groupMemberToMemberResponseList")
@IterableMapping(qualifiedByName = "groupMemberToMemberResponse")
@IterableMapping(elementTargetType = GroupMemberResponse.class)
List<GroupMemberResponse> toGroupMemberResponseList(List<GroupMember> groupMemberList);

@Mapping(target = "groupId", source = "group.id")
@Mapping(target = "groupMembers", source = "groupMembers")
GroupInfoResponse toGroupInfo(Group group, List<GroupMemberResponse> groupMembers);

@Named("groupMemberToGroupInfoResponse")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@Getter
@RequiredArgsConstructor
public enum RabbitMQConstant {
LOCATION_QUEUE("map.queue"),
LOCATION_QUEUE("map.queue.*"),
LOCATION_EXCHANGE("map"),
LOCATION_ROUTING_KEY("location.*"),
LOCATION_ROUTING_KEY_PREFIX("location."),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
package com.twtw.backend.domain.group.controller;

import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentRequest;
import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentResponse;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.BDDMockito.willDoNothing;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

import com.twtw.backend.domain.group.dto.request.*;
import com.twtw.backend.domain.group.dto.response.GroupInfoResponse;
import com.twtw.backend.domain.group.dto.response.GroupMemberResponse;
import com.twtw.backend.domain.group.service.GroupService;
import com.twtw.backend.support.docs.RestDocsTest;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest;
Expand All @@ -29,6 +16,17 @@
import java.util.List;
import java.util.UUID;

import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentRequest;
import static com.twtw.backend.support.docs.ApiDocsUtils.getDocumentResponse;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.BDDMockito.willDoNothing;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@DisplayName("GroupController의")
@WebMvcTest(GroupController.class)
class GroupControllerTest extends RestDocsTest {
Expand Down Expand Up @@ -124,7 +122,7 @@ void joinGroup() throws Exception {
"Bearer wefa3fsdczf32.gaoiuergf92.gb5hsa2jgh"));

// then
perform.andExpect(status().isNoContent()).andExpect(jsonPath("$.groupId").isString());
perform.andExpect(status().isNoContent());

// docs
perform.andDo(print())
Expand Down

0 comments on commit 03d2583

Please sign in to comment.