diff --git a/src/main/java/cjkimhello97/toy/crashMyServer/auth/exception/AuthExceptionType.java b/src/main/java/cjkimhello97/toy/crashMyServer/auth/exception/AuthExceptionType.java index 5671435..2040022 100644 --- a/src/main/java/cjkimhello97/toy/crashMyServer/auth/exception/AuthExceptionType.java +++ b/src/main/java/cjkimhello97/toy/crashMyServer/auth/exception/AuthExceptionType.java @@ -15,7 +15,7 @@ public enum AuthExceptionType implements ExceptionType { // 회원가입 WRONG_PASSWORD(Status.BAD_REQUEST, 4007, "WRONG PASSWORD"), - NICKNAME_EXCEED_LENGTH_TEN(Status.BAD_REQUEST, 4008, "NICKNAME EXCEED LENGTH TEN"), + NICKNAME_TOO_LONG(Status.BAD_REQUEST, 4008, "NICKNAME TOO LONG"), ALREADY_SIGN_OUT(Status.UNAUTHORIZED, 4009, "ALREADY SIGN OUT") ; diff --git a/src/main/java/cjkimhello97/toy/crashMyServer/auth/service/AuthService.java b/src/main/java/cjkimhello97/toy/crashMyServer/auth/service/AuthService.java index 3296e21..21a8892 100644 --- a/src/main/java/cjkimhello97/toy/crashMyServer/auth/service/AuthService.java +++ b/src/main/java/cjkimhello97/toy/crashMyServer/auth/service/AuthService.java @@ -1,16 +1,15 @@ package cjkimhello97.toy.crashMyServer.auth.service; -import static cjkimhello97.toy.crashMyServer.auth.exception.AuthExceptionType.*; import static cjkimhello97.toy.crashMyServer.auth.exception.AuthExceptionType.INVALID_TOKEN; -import static cjkimhello97.toy.crashMyServer.auth.exception.AuthExceptionType.NICKNAME_EXCEED_LENGTH_TEN; +import static cjkimhello97.toy.crashMyServer.auth.exception.AuthExceptionType.NICKNAME_TOO_LONG; +import static cjkimhello97.toy.crashMyServer.auth.exception.AuthExceptionType.UNAUTHORIZED; import static cjkimhello97.toy.crashMyServer.auth.exception.AuthExceptionType.WRONG_PASSWORD; -import static java.lang.Boolean.*; +import static java.lang.Boolean.TRUE; import cjkimhello97.toy.crashMyServer.auth.controller.dto.SignInResponse; import cjkimhello97.toy.crashMyServer.auth.controller.dto.SignOutResponse; import cjkimhello97.toy.crashMyServer.auth.controller.dto.TokenResponse; import cjkimhello97.toy.crashMyServer.auth.exception.AuthException; -import cjkimhello97.toy.crashMyServer.auth.exception.AuthExceptionType; import cjkimhello97.toy.crashMyServer.auth.infrastructure.JwtProvider; import cjkimhello97.toy.crashMyServer.auth.service.dto.ReissueRequest; import cjkimhello97.toy.crashMyServer.auth.service.dto.SignupRequest; @@ -110,7 +109,7 @@ public SignOutResponse signOut(HttpServletRequest request, Long memberId) { private void validateNickname(String nickname) { if (nickname.length() > 10) { - throw new AuthException(NICKNAME_EXCEED_LENGTH_TEN); + throw new AuthException(NICKNAME_TOO_LONG); } } } diff --git a/src/main/java/cjkimhello97/toy/crashMyServer/kafka/config/KafkaTopicConfig.java b/src/main/java/cjkimhello97/toy/crashMyServer/kafka/config/KafkaTopicConfig.java index dfe3198..bd5c320 100644 --- a/src/main/java/cjkimhello97/toy/crashMyServer/kafka/config/KafkaTopicConfig.java +++ b/src/main/java/cjkimhello97/toy/crashMyServer/kafka/config/KafkaTopicConfig.java @@ -22,7 +22,7 @@ public KafkaAdmin kafkaAdmin() { Map adminProps = new HashMap<>(); adminProps.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, kafkaConstants.KAFKA_BROKER); adminProps.put(AdminClientConfig.REQUEST_TIMEOUT_MS_CONFIG, 5000); // 메타데이터 요청 타임아웃 - adminProps.put(AdminClientConfig.CONNECTIONS_MAX_IDLE_MS_CONFIG, 6000); // 브로커 연결 유지 최대 시간 + adminProps.put(AdminClientConfig.CONNECTIONS_MAX_IDLE_MS_CONFIG, 60000); // 브로커 연결 유지 최대 시간 return new KafkaAdmin(adminProps); } diff --git a/src/test/java/cjkimhello97/toy/crashMyServer/service/auth/MysqlIntegrationTest.java b/src/test/java/cjkimhello97/toy/crashMyServer/service/auth/MysqlIntegrationTest.java index 1bc7865..a0eb873 100644 --- a/src/test/java/cjkimhello97/toy/crashMyServer/service/auth/MysqlIntegrationTest.java +++ b/src/test/java/cjkimhello97/toy/crashMyServer/service/auth/MysqlIntegrationTest.java @@ -1,6 +1,6 @@ package cjkimhello97.toy.crashMyServer.service.auth; -import static cjkimhello97.toy.crashMyServer.auth.exception.AuthExceptionType.NICKNAME_EXCEED_LENGTH_TEN; +import static cjkimhello97.toy.crashMyServer.auth.exception.AuthExceptionType.NICKNAME_TOO_LONG; import static cjkimhello97.toy.crashMyServer.service.auth.testdata.AuthServiceTestDataBuilder.*; import cjkimhello97.toy.crashMyServer.IntegrationTest; @@ -134,7 +134,7 @@ public class MysqlIntegrationTest extends IntegrationTest { AuthException authException = Assertions.assertThrows(AuthException.class, () -> { authService.signUp(badSignupRequest); }); - Assertions.assertEquals(authException.getExceptionType(), NICKNAME_EXCEED_LENGTH_TEN); + Assertions.assertEquals(authException.getExceptionType(), NICKNAME_TOO_LONG); } }