-
Notifications
You must be signed in to change notification settings - Fork 319
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
enable snapping_include_static_closure by default for reroute #6164
Conversation
46c199b
to
65d1370
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are ❌
com.******.navigation.core.routeoptions.RouteOptionsUpdaterTest$SnappingClosuresOptionsParameterized > snappingClosuresOptions[4] FAILED
java.lang.AssertionError at RouteOptionsUpdaterTest.kt:554
com.******.navigation.core.routeoptions.RouteOptionsUpdaterTest$SnappingStaticClosuresOptionsParameterized > snappingClosuresOptions[4] FAILED
java.lang.AssertionError at RouteOptionsUpdaterTest.kt:675
910 tests completed, 2 failed, 2 skipped
> Task :libnavigation-core:testDebugUnitTest FAILED
libnavigation-core/src/main/java/com/mapbox/navigation/core/routeoptions/RouteOptionsUpdater.kt
Outdated
Show resolved
Hide resolved
@@ -100,32 +100,15 @@ class RouteOptionsUpdater { | |||
it.addAll(approachesList.subList(index, coordinatesList.size)) | |||
} | |||
} | |||
).apply { | |||
if (routeOptions.profile() == DirectionsCriteria.PROFILE_DRIVING_TRAFFIC) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this removed on purpose? Look at #6147
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase issues. Moved it back.
.snappingIncludeClosuresList( | ||
routeOptions.snappingIncludeClosuresList() | ||
.withFirstTrue(remainingWaypoints, index, coordinatesList.size) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot rely on nullability when adding snappingIncludeClosuresList
and snappingIncludeStaticClosuresList
. We do want to add these parameters to a reroute request even if they were not part of the original request. That's why we need to check for the profile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I returned the profile check so it should work as expected now.
65d1370
to
c7d3817
Compare
...gation-core/src/test/java/com/mapbox/navigation/core/routeoptions/RouteOptionsUpdaterTest.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #6164 +/- ##
============================================
- Coverage 68.91% 68.86% -0.05%
+ Complexity 4258 4256 -2
============================================
Files 639 639
Lines 25663 25666 +3
Branches 3004 3004
============================================
- Hits 17686 17676 -10
- Misses 6830 6845 +15
+ Partials 1147 1145 -2
|
c7d3817
to
f0ea85e
Compare
Description
Fixes #6119.