Project3- ch.6의 질문
2025.01.27 14:29 작성
쿠폰 수량이 500개고 locust로 성능테스트를 할 때 redis에 500개가 저장이 되면 이후의 요청에 대해서는 오류를 리턴하기 때문에 locust에서
failure이 증가해야 하는것 같은데 증가하지 않아서 질문합니다.
public void checkCouponIssueQuantity(CouponRedisEntity couponRedisEntity, long userId) { if(!availableTotalIssueQuantity(couponRedisEntity.totalQuantity(), couponRedisEntity.id())) { throw new CouponIssueException(INVALID_COUPON_ISSUE_QUANTITY, "발급 가능 수량 초과"); } -> 이것으로 인해서 에러 발생 if(!availableUserIssueQuantity(couponRedisEntity.id(), userId)) { throw new CouponIssueException(DUPLICATED_COUPON_ISSUE, "이미 있음"); }}