fix(route): map small return gaps to Seoul - #13
Conversation
📝 WalkthroughWalkthrough
ChangesReturn-route Seoul fallback
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/test/java/com/cotato/cokerthon/domain/route/service/ReturnRouteServiceTest.java (1)
131-160: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd threshold boundary coverage.
This test validates WEST
15, but parameterized cases for-15and16would also prove both-direction fallback and that candidate lookup resumes above the threshold.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/java/com/cotato/cokerthon/domain/route/service/ReturnRouteServiceTest.java` around lines 131 - 160, Add parameterized boundary cases to createReturnRouteMapsWest15MinutesToSeoulWithoutFindingCityCandidates (or extract a shared parameterized test) covering gap values -15 and 16 in addition to WEST 15. Assert -15 also falls back to the BASE/Seoul checkpoint without candidate lookup, while 16 resumes cityRepository.findAllByDirectionAndGapMinutes with the expected direction and gap.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@src/test/java/com/cotato/cokerthon/domain/route/service/ReturnRouteServiceTest.java`:
- Around line 131-160: Add parameterized boundary cases to
createReturnRouteMapsWest15MinutesToSeoulWithoutFindingCityCandidates (or
extract a shared parameterized test) covering gap values -15 and 16 in addition
to WEST 15. Assert -15 also falls back to the BASE/Seoul checkpoint without
candidate lookup, while 16 resumes
cityRepository.findAllByDirectionAndGapMinutes with the expected direction and
gap.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8f905509-49a7-4a82-bd75-4309ec6b4354
📒 Files selected for processing (2)
src/main/java/com/cotato/cokerthon/domain/route/service/ReturnRouteService.javasrc/test/java/com/cotato/cokerthon/domain/route/service/ReturnRouteServiceTest.java
What changed
WEST 15maps to Seoul and does not call the city candidate lookup.Why
A return route such as
03:00~10:00 -> 23:00~07:00can produce a tiny remaining gap right before arrival, for exampleWEST 15. The city mapping table does not cover that range, so route creation failed before saving.Validation
./gradlew test --tests com.cotato.cokerthon.domain.route.service.ReturnRouteServiceTest./gradlew testSummary by CodeRabbit