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

bump NN to 161.1.0 #7614

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/unreleased/bugfixes/7614.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Supported ETC 2.0 payment method.
8 changes: 4 additions & 4 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ ext {
// version which we should use in this build
def mapboxNavigatorVersion = System.getenv("FORCE_MAPBOX_NAVIGATION_NATIVE_VERSION")
if (mapboxNavigatorVersion == null || mapboxNavigatorVersion == '') {
mapboxNavigatorVersion = '161.0.1'
mapboxNavigatorVersion = '161.1.0'
}
println("Navigation Native version: " + mapboxNavigatorVersion)

version = [
mapboxMapSdk : '10.16.1',
mapboxSdkServices : '6.14.0',
mapboxMapSdk : '10.16.2',
mapboxSdkServices : '6.15.0',
mapboxNavigator : "${mapboxNavigatorVersion}",
mapboxCommonNative : '23.8.3',
mapboxCommonNative : '23.8.4',
mapboxCrashMonitor : '2.0.0',
mapboxAnnotationPlugin : '0.8.0',
mapboxBaseAndroid : '0.8.0',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,8 +877,10 @@ class CoreRerouteTest : BaseTest<EmptyTestActivity>(EmptyTestActivity::class.jav
assertEquals(routes[1], rerouteResult.navigationRoutes.first())
}

// Restarting mock web server takes up to 30 seconds.
// Let it finish and skip the test if it did not succeed.
@Test
fun reroute_with_retryable_error() = sdkTest {
fun reroute_with_retryable_error() = sdkTest(timeout = 50_000) {
val mockRoute = RoutesProvider.dc_very_short(context)
val originLocation = mockRoute.routeWaypoints.first()
val initialLocation = mockLocationUpdatesRule.generateLocationUpdate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ package com.mapbox.navigation.testing.ui.http

import android.util.Log
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.TimeoutCancellationException
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive
import kotlinx.coroutines.withContext
import kotlinx.coroutines.withTimeout
import kotlinx.coroutines.withTimeoutOrNull
import okhttp3.mockwebserver.Dispatcher
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okhttp3.mockwebserver.RecordedRequest
import org.junit.Assume.assumeTrue
import org.junit.rules.TestWatcher
import org.junit.runner.Description
import java.lang.StringBuilder
Expand Down Expand Up @@ -85,24 +90,34 @@ class MockWebServerRule : TestWatcher() {
block()
} finally {
withContext(Dispatchers.IO) {
retryStarting(previousPort)
val serverRestarted = retryStarting(previousPort)
assumeTrue("Mock web server could not be restarted", serverRestarted)
initDispatcher()
}
}
}

private suspend fun retryStarting(port: Int) {
withTimeoutOrNull(30_000) {
while (true) {
try {
webServer = MockWebServer()
webServer.start(port)
break
} catch (t: Throwable) {
Log.e("MockWebServerRule", "error starting mock web server", t)
private suspend fun retryStarting(port: Int): Boolean {
try {
withTimeout(30_000) {
while (true) {
if (!isActive) {
Log.e("MockWebServerRule", "can't start mock server on port $port")
return@withTimeout false
}
try {
webServer = MockWebServer()
webServer.start(port)
return@withTimeout true
} catch (t: Throwable) {
Log.e("MockWebServerRule", "error starting mock web server", t)
}
delay(500)
}
delay(500)
}
} ?: error("can't start mock server on port $port")
} catch (ex: TimeoutCancellationException) {
return false
}
return false
}
}