diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2019-03-07 15:21:23 +0100 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2019-03-18 12:00:19 +0100 |
commit | ce1a46d6453ad8a4606775b8c462fa15948822f5 (patch) | |
tree | b2fea546dac2c5bd9dd41472a1963d371ea1e081 /platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CustomGeometrySourceTest.kt | |
parent | 7939ff213a98de055e93ddd893ccae40b82a7d16 (diff) | |
download | qtlocation-mapboxgl-ce1a46d6453ad8a4606775b8c462fa15948822f5.tar.gz |
[android] - remove base idlingResource setup
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CustomGeometrySourceTest.kt')
-rw-r--r-- | platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CustomGeometrySourceTest.kt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CustomGeometrySourceTest.kt b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CustomGeometrySourceTest.kt index eb458ab8f5..a6238ebf14 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CustomGeometrySourceTest.kt +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/CustomGeometrySourceTest.kt @@ -6,8 +6,9 @@ import com.mapbox.mapboxsdk.style.sources.CustomGeometrySource import com.mapbox.mapboxsdk.style.sources.CustomGeometrySource.THREAD_POOL_LIMIT import com.mapbox.mapboxsdk.style.sources.CustomGeometrySource.THREAD_PREFIX import com.mapbox.mapboxsdk.testapp.action.MapboxMapAction.invoke -import com.mapbox.mapboxsdk.testapp.action.OrientationChangeAction.orientationLandscape -import com.mapbox.mapboxsdk.testapp.action.OrientationChangeAction.orientationPortrait +import com.mapbox.mapboxsdk.testapp.action.OrientationAction.orientationLandscape +import com.mapbox.mapboxsdk.testapp.action.OrientationAction.orientationPortrait +import com.mapbox.mapboxsdk.testapp.action.WaitAction import com.mapbox.mapboxsdk.testapp.activity.BaseTest import com.mapbox.mapboxsdk.testapp.activity.style.GridSourceActivity import com.mapbox.mapboxsdk.testapp.activity.style.GridSourceActivity.ID_GRID_LAYER @@ -25,11 +26,11 @@ class CustomGeometrySourceTest : BaseTest() { @Ignore fun sourceNotLeakingThreadsTest() { validateTestSetup() - waitAction(4000) + WaitAction.invoke(4000) onView(isRoot()).perform(orientationLandscape()) - waitAction(2000) + WaitAction.invoke(2000) onView(isRoot()).perform(orientationPortrait()) - waitAction(2000) + WaitAction.invoke(2000) Assert.assertFalse("Threads should be shutdown when the source is destroyed.", Thread.getAllStackTraces().keys.filter { it.name.startsWith(THREAD_PREFIX) @@ -42,9 +43,9 @@ class CustomGeometrySourceTest : BaseTest() { validateTestSetup() invoke(mapboxMap) { uiController, mapboxMap -> mapboxMap.style!!.removeLayer(ID_GRID_LAYER) - TestingAsyncUtils.waitForLayer(uiController, idlingResource.mapView) + TestingAsyncUtils.waitForLayer(uiController, mapView) mapboxMap.style!!.removeSource(ID_GRID_SOURCE) - TestingAsyncUtils.waitForLayer(uiController, idlingResource.mapView) + TestingAsyncUtils.waitForLayer(uiController, mapView) Assert.assertTrue("There should be no threads running when the source is removed.", Thread.getAllStackTraces().keys.filter { it.name.startsWith(CustomGeometrySource.THREAD_PREFIX) @@ -58,12 +59,12 @@ class CustomGeometrySourceTest : BaseTest() { validateTestSetup() invoke(mapboxMap) { uiController, mapboxMap -> mapboxMap.style!!.removeLayer((rule.activity as GridSourceActivity).layer) - TestingAsyncUtils.waitForLayer(uiController, idlingResource.mapView) + TestingAsyncUtils.waitForLayer(uiController, mapView) mapboxMap.style!!.removeSource(ID_GRID_SOURCE) - TestingAsyncUtils.waitForLayer(uiController, idlingResource.mapView) + TestingAsyncUtils.waitForLayer(uiController, mapView) mapboxMap.style!!.addSource((rule.activity as GridSourceActivity).source) mapboxMap.style!!.addLayer((rule.activity as GridSourceActivity).layer) - TestingAsyncUtils.waitForLayer(uiController, idlingResource.mapView) + TestingAsyncUtils.waitForLayer(uiController, mapView) Assert.assertTrue("Threads should be restarted when the source is re-added to the map.", Thread.getAllStackTraces().keys.filter { it.name.startsWith(CustomGeometrySource.THREAD_PREFIX) |