Skip to content

Commit

Permalink
Test: Lock 제외하고 테스트 (#58)
Browse files Browse the repository at this point in the history
* Test: 비관적 락 사용

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

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

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

* Test: Lock 제외하고 테스트
  • Loading branch information
klkim1913 authored Aug 4, 2023
1 parent 9286616 commit acace37
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/anywayclear/service/AuctionService.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ public AuctionService(AuctionRepository auctionRepository) {
this.auctionRepository = auctionRepository;
}

@Lock(LockModeType.PESSIMISTIC_WRITE)
@Transactional
@Lock(LockModeType.PESSIMISTIC_WRITE)
// @Lock(LockModeType.PESSIMISTIC_WRITE)
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 acace37

Please sign in to comment.