Skip to content

Commit

Permalink
Test: PESSIMISTIC_READ로 변경 (#63)
Browse files Browse the repository at this point in the history
* Test: 비관적 락 사용

* Test: 비관적 트랜 어노 위에

* Test: 비관락 재시도 및 test 주석처리

* Test: test 주석처리 풀고 수정

* Test: Lock 제외하고 테스트

* Test: PESSIMISTIC_WRITE 재시도

* Test: PESSIMISTIC_READ로 변경
  • Loading branch information
klkim1913 authored Aug 7, 2023
1 parent 6007c29 commit bcaf951
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/anywayclear/service/AuctionService.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public AuctionService(AuctionRepository auctionRepository) {
}

@Transactional
@Lock(LockModeType.PESSIMISTIC_WRITE)
@Lock(LockModeType.PESSIMISTIC_READ)
public BiddingResponse Bidding(long auctionId, BiddingRequest request) {
Auction auction = auctionRepository.findById(auctionId).orElseThrow(() -> new CustomException(INVALID_AUCTION_ID));
if (request.getPrice() < auction.getPrice() + 100) { // 가격 기준 정해지면 수정할 로직
Expand Down

0 comments on commit bcaf951

Please sign in to comment.