Skip to content

Commit

Permalink
test: 동시성 테스트 disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nuyh99 committed Jan 8, 2024
1 parent 02a1461 commit 9e67166
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.example.busan.room.domain.RoomRepository;
import com.example.busan.room.dto.CreateRoomRequest;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -79,6 +80,7 @@ void create() {
assertThat(reservationRepository.findAll()).hasSize(1);
}

@Disabled("동시성 테스트 때만 사용")
@Test
@DisplayName("동시적으로 중복 예약을 하면 1개만 생성된다")
void create_concurrency() throws InterruptedException {
Expand Down Expand Up @@ -107,6 +109,7 @@ void create_concurrency() throws InterruptedException {
assertThat(reservationRepository.count()).isOne();
}

@Disabled("동시성 테스트 때만 사용")
@Test
@DisplayName("동시적으로 100개의 요청 성공")
void create_concurrency2() throws InterruptedException {
Expand Down

0 comments on commit 9e67166

Please sign in to comment.