Skip to content

Refactor: 테스트 파일 수정 - #108

Merged
jaebeom79 merged 1 commit into
mainfrom
develop
May 30, 2026
Merged

Refactor: 테스트 파일 수정#108
jaebeom79 merged 1 commit into
mainfrom
develop

Conversation

@jaebeom79

Copy link
Copy Markdown
Contributor

📢 기능 설명

grafan에서 상태코드 수집 가능하도록 수정

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new code field to the ApiResponse class, updating its static factory methods to populate this field using a new default getCode() method defined in the ResponseCode interface. Additionally, local variables for email and nickname are extracted in VacancyLoadTestTokenGenerator to simplify the builder pattern. The reviewer suggested making the fields of ApiResponse final to ensure immutability and enhance thread safety.

Comment on lines 11 to 14
private int status;
private String code;
private String message;
private T data;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

API 응답을 표현하는 ApiResponse 클래스는 불변(Immutable) 객체로 설계하는 것이 안전합니다. 현재 필드들이 final로 선언되어 있지 않아 외부에서 변경될 여지가 있습니다. 필드들을 final로 선언하여 객체의 불변성을 보장하고 안정성을 높이는 것을 권장합니다.

Suggested change
private int status;
private String code;
private String message;
private T data;
private final int status;
private final String code;
private final String message;
private final T data;

@jaebeom79
jaebeom79 merged commit c4255b8 into main May 30, 2026
1 check passed
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.

1 participant