Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: RouteClinet 로깅 및 리팩터링 누락 코드 추가 #903

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

eun-byeol
Copy link
Contributor

🚩 연관 이슈

close #902


📝 작업 내용

#898 dev로 머지하는 과정에서, 일부 코드가 누락되어 로깅이 적용되지 않아 수정했습니다.

누락된 이유

dev에서 RouteClient 관련 코드를 revert 전에 코드 보관을 위해 898 브랜치를 파두었었어요.
그러나, 898 브랜치에는 revert 전 코드(리팩터링, 로깅 코드)에 대한 커밋이 없었다보니 dev로 머지하는 과정에서 추적이 되지 않았어요.
그래서 새로 브랜치 파서, revert 전 코드들을 복사해서 커밋했습니다ㅎㅎ 이런 실수 다신 안 하도록 유의하겠습니다🙇‍♀️

코드 추가 후, 오디세이와 구글 매핑 다시 확인했습니다.

2024-11-14 17:08:44.278 [INFO] [http-nio-8080-exec-2] [cb499c15-81a5-4bc7-bc91-fb3319d06900] [c.o.r.c.RouteClientLoggingInterceptor] - [RouteClient Request] Method: GET, URI: https://api.odsay.com/v1/api/searchPubTransPathT?SX=127.0506910&SY=37.5057130&EX=127.1031130&EY=37.5152980&apiKey=비밀!!
2024-11-14 17:08:44.469 [INFO] [http-nio-8080-exec-2] [cb499c15-81a5-4bc7-bc91-fb3319d06900] [c.o.r.c.RouteClientLoggingInterceptor] - [RouteClient Response] Status: 200 OK, Body: {"result":{"searchType":0,"outTrafficCheck":0,"busCount":10,"subwayCount":1,"subwayBusCount":1,"pointDistance":4755,"startRadius":700,"endRadius":700,"path":[{"pathType":1,"info":{"trafficDistance":4700.0,"totalWalk":517,"totalTime":16,"payment":1400,"busTransitCount":0,"subwayTransitCount":1,"mapObj":"2:2:220:216","firstStartStation":"선릉","lastEndStation":"잠실","totalStationCount":4,"busStationCount":0,"subwayStationCount":4,"totalDistance":5217.0,"totalWalkTime":-1,"checkIntervalTime":100,"chec...
2024-11-14 17:08:44.484 [INFO] [http-nio-8080-exec-2] [cb499c15-81a5-4bc7-bc91-fb3319d06900] [com.ody.route.service.RouteService] - ODSAY API 소요 시간 계산 : 16분, mateId : null
2024-11-14 17:09:57.317 [INFO] [http-nio-8080-exec-2] [864cc3a5-3e14-4a5f-ab56-9943648487bc] [c.o.r.c.RouteClientLoggingInterceptor] - [RouteClient Request] Method: GET, URI: https://maps.googleapis.com/maps/api/distancematrix/json?destinations=37.5152980,127.1031130&origins=37.5057130,127.0506910&mode=transit&transit_mode=bus%7Csubway&key=비밀!!
2024-11-14 17:09:57.737 [INFO] [http-nio-8080-exec-2] [864cc3a5-3e14-4a5f-ab56-9943648487bc] [c.o.r.c.RouteClientLoggingInterceptor] - [RouteClient Response] Status: 200 OK, Body: {"destination_addresses":["7-20 Sincheon-dong, Songpa District, Seoul, South Korea"],"origin_addresses":["142-35 Samseong-dong, Gangnam District, Seoul, South Korea"],"rows":[{"elements":[{"distance":{"text":"5.2 km","value":5160},"duration":{"text":"19 mins","value":1135},"status":"OK"}]}],"status":"OK"}
2024-11-14 17:09:57.757 [INFO] [http-nio-8080-exec-2] [864cc3a5-3e14-4a5f-ab56-9943648487bc] [com.ody.route.service.RouteService] - GOOGLE API 소요 시간 계산 : 18분, mateId : null

🏞️ 스크린샷 (선택)


🗣️ 리뷰 요구사항 (선택)

Copy link

Test Results

 53 files  ±0   53 suites  ±0   6s ⏱️ ±0s
188 tests ±0  188 ✅ ±0  0 💤 ±0  0 ❌ ±0 
189 runs  ±0  189 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 53ac731. ± Comparison against base commit 48d04b2.

This pull request removes 6 and adds 6 tests. Note that renamed tests count towards both.
com.ody.auth.JwtTokenProviderTest$validateAccessToken ‑ [1] accessToken=com.ody.auth.token.AccessToken@968e4c1
com.ody.auth.JwtTokenProviderTest$validateAccessToken ‑ [2] accessToken=com.ody.auth.token.AccessToken@73526b2d
com.ody.common.validator.FutureOrPresentDateTimeValidatorTest ‑ [1] date=2024-11-14, time=16:33:33.487917475, expected=false
com.ody.common.validator.FutureOrPresentDateTimeValidatorTest ‑ [2] date=2024-11-14, time=17:33:33.487949104, expected=true
com.ody.common.validator.FutureOrPresentDateTimeValidatorTest ‑ [3] date=2024-11-14, time=15:33:33.487936420, expected=false
com.ody.common.validator.FutureOrPresentDateTimeValidatorTest ‑ [4] date=2024-11-15, time=16:33:33.487917475, expected=true
com.ody.auth.JwtTokenProviderTest$validateAccessToken ‑ [1] accessToken=com.ody.auth.token.AccessToken@46b80ac0
com.ody.auth.JwtTokenProviderTest$validateAccessToken ‑ [2] accessToken=com.ody.auth.token.AccessToken@39fdcf59
com.ody.common.validator.FutureOrPresentDateTimeValidatorTest ‑ [1] date=2024-11-14, time=17:22:57.948571925, expected=false
com.ody.common.validator.FutureOrPresentDateTimeValidatorTest ‑ [2] date=2024-11-14, time=18:22:57.948604967, expected=true
com.ody.common.validator.FutureOrPresentDateTimeValidatorTest ‑ [3] date=2024-11-14, time=16:22:57.948592343, expected=false
com.ody.common.validator.FutureOrPresentDateTimeValidatorTest ‑ [4] date=2024-11-15, time=17:22:57.948571925, expected=true

Copy link

📝 Test Coverage Report

Overall Project 82.12% -0.79% 🍏
Files changed 64.67%

File Coverage
RouteClientProperty.java 100% 🍏
EtaService.java 96.99% 🍏
GoogleRouteClient.java 93.85% 🍏
RouteClientProperties.java 86.96% -13.04% 🍏
OdsayRouteClient.java 84.27% 🍏
RouteConfig.java 0% -81.97%

Copy link
Contributor

@mzeong mzeong left a comment

Choose a reason for hiding this comment

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

ㅋㅋㅋㅋㅋㅋㅋ 고생했어요 조조

@hyeon0208
Copy link
Contributor

실수할수도있제 ~ 고생해썽요

Copy link
Contributor

@coli-geonwoo coli-geonwoo left a comment

Choose a reason for hiding this comment

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

고생 많았어요 조조 개인일정 때문에 계속 리뷰가 늦어지네요 ㅠㅠ 연락해주어 고마워요!

@eun-byeol eun-byeol merged commit a7ba2fd into develop Nov 14, 2024
3 checks passed
@eun-byeol eun-byeol deleted the feature/902 branch November 14, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

fix: RestClient 리팩터링 및 로깅 관련 누락된 코드 추가
4 participants