Skip to content

Commit

Permalink
Revert "Disable failing tests"
Browse files Browse the repository at this point in the history
This reverts commit 5bdafb1.
  • Loading branch information
ndegwamartin committed Sep 18, 2024
1 parent 93c3eb6 commit 8411966
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ private synchronized void recordPendingLocation() {
/**
* Volatile because different methods are called from the main thread and serviceThread
*/
private final LocationListener locationListener = new LocationListener() {
private volatile LocationListener locationListener = new LocationListener() {
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.json.JSONObject;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
Expand Down Expand Up @@ -66,6 +65,11 @@
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;

/**
*
*
* Created by Ephraim Kigamba - [email protected] on 05/12/2017.
*/
@RunWith(RobolectricTestRunner.class)
@Config(manifest = Config.NONE,
shadows = {
Expand All @@ -85,7 +89,7 @@ public class MapboxOfflineDownloaderServiceTest {
private Context context;
private MapboxOfflineDownloaderService mapboxOfflineDownloaderService;

private final String sampleValidMapboxStyleURL = "mapbox://styles/ona/90kiosdcIJ3d";
private String sampleValidMapboxStyleURL = "mapbox://styles/ona/90kiosdcIJ3d";
private String mapboxAccessToken;
private float minZoom = 22;
private float maxZoom = 10;
Expand Down Expand Up @@ -241,19 +245,16 @@ public void persistOfflineMapTaskShouldSaveQueueTaskWhenGivenValidDownloadTask()
}

@Test
@Ignore("Hanging on CI")
public void sendBroadcastShouldProduceValidIntentWhenGivenDownloadUpdate() {
assertValidBroadcastCreatedWhenSendBroadcastIsCalled(MapboxOfflineDownloaderService.SERVICE_ACTION_RESULT.SUCCESSFUL, mapName, "9.0%", MapboxOfflineDownloaderService.SERVICE_ACTION.DOWNLOAD_MAP);
}

@Test
@Ignore("Hanging on CI")
public void sendBroadcast2ShouldProduceValidIntentWhenGivenDownloadUpdate() {
assertValidBroadcastCreatedWhenSendBroadcast2IsCalled(MapboxOfflineDownloaderService.SERVICE_ACTION_RESULT.SUCCESSFUL, mapName, MapboxOfflineDownloaderService.SERVICE_ACTION.DELETE_MAP);
}

@Test
@Ignore("Hanging on CI")
public void mapboxTileLimitExceededShouldCreateValidBroadcast() throws InterruptedException, NoSuchFieldException, IllegalAccessException {
latch = new CountDownLatch(1);

Expand All @@ -269,7 +270,6 @@ public void mapboxTileLimitExceededShouldCreateValidBroadcast() throws Interrupt
}

@Test
@Ignore("Failing : To Do Fix")
public void onErrorShouldCreateValidBroadcastWhenGivenNonEmptyReasonAndMessage() throws NoSuchFieldException, IllegalAccessException {
latch = new CountDownLatch(1);

Expand All @@ -286,7 +286,6 @@ public void onErrorShouldCreateValidBroadcastWhenGivenNonEmptyReasonAndMessage()
}

@Test
@Ignore("Hanging on CI")
public void onErrorShouldCreateValidBroadcastWhenGivenNonEmptyReasonAndEmptyMessage() throws NoSuchFieldException, IllegalAccessException, InterruptedException {
latch = new CountDownLatch(1);

Expand All @@ -304,7 +303,6 @@ public void onErrorShouldCreateValidBroadcastWhenGivenNonEmptyReasonAndEmptyMess
}

@Test
@Ignore("Hanging on CI")
public void onStatusChangedShouldShowProgressNotificationWhenGivenIncompleteOfflineRegionStatus() throws NoSuchFieldException, IllegalAccessException, InterruptedException, NoSuchMethodException, InvocationTargetException {
latch = new CountDownLatch(1);
OfflineRegionStatus incompleteOfflineRegionStatus = createOfflineRegion(OfflineRegion.STATE_ACTIVE, 200, 98923, 898, 230909, 300, true, false);
Expand Down Expand Up @@ -427,7 +425,6 @@ public void getTaskStatusShouldUpdateCurrentDownloadMapNameWhenGivenValidDeleteQ
}

@Test
@Ignore("Hanging on CI")
public synchronized void onStatusChangedShouldShowDownloadCompleteNotificationWhenGivenCompletedOfflineRegion() throws Throwable {
latch = new CountDownLatch(1);
OfflineRegionStatus completeOfflineRegionStatus = createOfflineRegion(OfflineRegion.STATE_ACTIVE, 300, 98923, 898, 230909, 300, true, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public void testTrackingServiceDefaultUiConfiguration() {
}

@Test
@Ignore("Hanging on CI")
public void testStartAndBindService() throws InterruptedException {
CountDownLatch latch1 = new CountDownLatch(1);
CountDownLatch latch2 = new CountDownLatch(1);
Expand Down Expand Up @@ -222,7 +221,6 @@ public void onServiceDisconnected(ComponentName name) {
}

@Test
@Ignore("Hanging on CI")
public void testServiceWithLocationInDistanceTolerance() throws InterruptedException {
controller = Robolectric.buildService(TrackingService.class,
TrackingService.getIntent(context, MapActivity.class, new TrackingServiceHighAccuracyOptions()));
Expand Down Expand Up @@ -320,7 +318,6 @@ public void onServiceDisconnected() {
}

@Test
@Ignore("Flakey Unit Test : To Do Fix")
public void testServiceWithTags() throws InterruptedException {
long startTag = 1000;
long nextTag = 2000;
Expand Down

0 comments on commit 8411966

Please sign in to comment.