Skip to content

Commit 26eb1c3

Browse files
committed
fix(volunteer-apply): @transactional 없던 오류 수정
1 parent ba34fad commit 26eb1c3

File tree

7 files changed

+14
-2
lines changed

7 files changed

+14
-2
lines changed

src/test/java/com/somemore/volunteer/service/VolunteerQueryServiceTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.somemore.volunteer.dto.response.VolunteerSimpleInfoResponseDto;
1818
import com.somemore.volunteer.repository.VolunteerDetailRepository;
1919
import com.somemore.volunteer.repository.VolunteerRepository;
20+
import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo;
2021
import java.util.List;
2122
import java.util.UUID;
2223
import org.junit.jupiter.api.DisplayName;
@@ -236,11 +237,11 @@ void getVolunteerSimpleInfosByIds() {
236237
volunteerDetailRepository.save(detail2);
237238

238239
// when
239-
List<VolunteerSimpleInfoResponseDto> dtos = volunteerQueryService.getVolunteerSimpleInfosByIds(
240+
List<VolunteerSimpleInfo> volunteers = volunteerQueryService.getVolunteerSimpleInfosByIds(
240241
List.of(volunteer1.getId(), volunteer2.getId(), UUID.randomUUID()));
241242

242243
// then
243-
assertThat(dtos).hasSize(2);
244+
assertThat(volunteers).hasSize(2);
244245
}
245246

246247
private static VolunteerDetail createVolunteerDetail(UUID volunteerId) {

src/test/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyServiceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
import org.junit.jupiter.api.DisplayName;
2020
import org.junit.jupiter.api.Test;
2121
import org.springframework.beans.factory.annotation.Autowired;
22+
import org.springframework.transaction.annotation.Transactional;
2223

24+
@Transactional
2325
class ApplyVolunteerApplyServiceTest extends IntegrationTestSupport {
2426

2527
@Autowired

src/test/java/com/somemore/volunteerapply/service/ApproveVolunteerApplyServiceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
import org.junit.jupiter.api.DisplayName;
2121
import org.junit.jupiter.api.Test;
2222
import org.springframework.beans.factory.annotation.Autowired;
23+
import org.springframework.transaction.annotation.Transactional;
2324

25+
@Transactional
2426
class ApproveVolunteerApplyServiceTest extends IntegrationTestSupport {
2527

2628
@Autowired

src/test/java/com/somemore/volunteerapply/service/RejectVolunteerApplyServiceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
import org.junit.jupiter.api.DisplayName;
2121
import org.junit.jupiter.api.Test;
2222
import org.springframework.beans.factory.annotation.Autowired;
23+
import org.springframework.transaction.annotation.Transactional;
2324

25+
@Transactional
2426
class RejectVolunteerApplyServiceTest extends IntegrationTestSupport {
2527

2628
@Autowired

src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
import org.springframework.data.domain.Page;
2727
import org.springframework.data.domain.PageRequest;
2828
import org.springframework.data.domain.Pageable;
29+
import org.springframework.transaction.annotation.Transactional;
2930

31+
@Transactional
3032
class VolunteerApplyQueryFacadeServiceTest extends IntegrationTestSupport {
3133

3234
@Autowired

src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryServiceTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.somemore.volunteerapply.domain.VolunteerApply;
1111
import com.somemore.volunteerapply.dto.response.VolunteerApplyResponseDto;
1212
import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto;
13+
import com.somemore.volunteerapply.repository.VolunteerApplyJpaRepository;
1314
import com.somemore.volunteerapply.repository.VolunteerApplyRepository;
1415
import java.util.List;
1516
import java.util.UUID;

src/test/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
import org.junit.jupiter.api.DisplayName;
1616
import org.junit.jupiter.api.Test;
1717
import org.springframework.beans.factory.annotation.Autowired;
18+
import org.springframework.transaction.annotation.Transactional;
1819

20+
@Transactional
1921
class WithdrawVolunteerApplyServiceTest extends IntegrationTestSupport {
2022

2123
@Autowired

0 commit comments

Comments
 (0)