Skip to content

Conversation

@3Juhwan
Copy link
Owner

@3Juhwan 3Juhwan commented Nov 21, 2024

close: #19 를 해결합니다.

@3Juhwan 3Juhwan requested a review from khabh November 21, 2024 06:21
@3Juhwan 3Juhwan self-assigned this Nov 21, 2024
Copy link
Collaborator

@khabh khabh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이제 요청 수 측정이 올바르게 되는 것 같네요 :)
제안 사항 하나 코멘트로 남겨 두었으니 확인해 주세요!

}

private void sendMultipleRequests(ExecutorService executorService, List<Member> members, Ticket... tickets) {
private void sendMultipleRequests(Integer threadCount, List<Member> members, Ticket... tickets) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private void sendMultipleRequests(Integer threadCount, List<Member> members, Ticket... tickets) {
private void sendMultipleRequests(int ticketIssueCount, List<Member> members, Ticket... tickets) {

Comment on lines +111 to +113
try (ExecutorService executorService = Executors.newFixedThreadPool(threadCount)) {
for (Member member : members) {
for (int i = 0; i < MemberTicket.MEMBER_TICKET_COUNT_MAX; i++) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
try (ExecutorService executorService = Executors.newFixedThreadPool(threadCount)) {
for (Member member : members) {
for (int i = 0; i < MemberTicket.MEMBER_TICKET_COUNT_MAX; i++) {
int threadCount = members.size() * ticketIssueCount;
try (ExecutorService executorService = Executors.newFixedThreadPool(threadCount)) {
for (Member member : members) {
for (int i = 0; i < ticketIssueCount; i++) {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 식으로 수정해 보는 건 어떨까요? 멤버당_티켓_발급_제한을_초과하는_요청_시_정상_처리_여부를_검증한다 테스트에서 멤버 티켓 발급 제한을 초과하지 않고 있는 문제가 있습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG/ticket] 성공/실패 요청 수 측정 오류

3 participants