Skip to content

Commit

Permalink
Fix instrumentation tests
Browse files Browse the repository at this point in the history
- Move Mapbox instantiation to UI thread
  • Loading branch information
ekigamba committed May 24, 2021
1 parent 805c8be commit c19e43a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ public class MapBoxOfflineResourcesDownloaderTest extends BaseTest {
public ExpectedException expectedException = ExpectedException.none();

@Before
public void setup() {
public void setup() throws Throwable {
context = InstrumentationRegistry.getTargetContext();
MapBoxOfflineResourcesDownloader.instance = null;
Mapbox.getInstance(context, "sample-token");

uiThreadTestRule.runOnUiThread(() -> Mapbox.getInstance(context, "sample-token"));
}

@Test
Expand Down

0 comments on commit c19e43a

Please sign in to comment.