Ensure offline manager @Before is completed before tests are run (#1251)
This commit is contained in:
@@ -37,14 +37,17 @@ class OfflineManagerTest : AppCenter() {
|
||||
@Before
|
||||
@After
|
||||
fun resetDatabase() {
|
||||
val latch = CountDownLatch(1)
|
||||
OfflineManager.getInstance(context).resetDatabase(object : OfflineManager.FileSourceCallback {
|
||||
override fun onSuccess() {
|
||||
latch.countDown()
|
||||
}
|
||||
|
||||
override fun onError(message: String) {
|
||||
throw IOException("Unable to reset database before / after tests.")
|
||||
}
|
||||
})
|
||||
latch.await()
|
||||
}
|
||||
|
||||
@Test(timeout = 30_000)
|
||||
|
||||
@@ -128,6 +128,7 @@ public class RuntimeStyleTests extends EspressoTest {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddLayerAt() {
|
||||
validateTestSetup();
|
||||
onView(withId(R.id.mapView)).perform(new BaseViewAction() {
|
||||
|
||||
Reference in New Issue
Block a user