Skip to content

Commit d9471d9

Browse files
committed
always destroy navigator
1 parent 6701931 commit d9471d9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

libnavigation-core/src/androidTest/java/com/mapbox/navigation/core/trip/service/ArtificialDriverTest.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,11 @@ private suspend fun withNavigators(
121121
.accessToken(context.getString(R.string.mapbox_access_token))
122122
.build()
123123
)
124-
block(mapboxNavigation, MapboxNativeNavigatorImpl)
125-
mapboxNavigation.onDestroy()
124+
try {
125+
block(mapboxNavigation, MapboxNativeNavigatorImpl)
126+
} finally {
127+
mapboxNavigation.onDestroy()
128+
}
126129
}
127130

128131
private fun getTestRoute(): NavigationRoute {

0 commit comments

Comments
 (0)