diff --git a/src/main/java/com/mapzen/open/core/DataUploadService.java b/src/main/java/com/mapzen/open/core/DataUploadService.java index ac007c2f..068a35db 100644 --- a/src/main/java/com/mapzen/open/core/DataUploadService.java +++ b/src/main/java/com/mapzen/open/core/DataUploadService.java @@ -68,7 +68,6 @@ import static org.apache.http.protocol.HTTP.UTF_8; public class DataUploadService extends Service { - private static final int MIN_NUM_TRACKING_POINTS = 10; private static final int MIN_RANGE_IN_METERS = 50; private static final String RANGE_QUERY_EXT = " from " @@ -217,10 +216,6 @@ public DOMSource getDocument(String groupId) { } trkElement.appendChild(trksegElement); Element documentElement = document.getDocumentElement(); - int numberOfPoints = documentElement.getElementsByTagName("ele").getLength(); - if (numberOfPoints < MIN_NUM_TRACKING_POINTS) { - return null; - } if (calculateMaxRange(groupId) < MIN_RANGE_IN_METERS) { return null; } diff --git a/src/test/java/com/mapzen/open/core/DataUploadServiceTest.java b/src/test/java/com/mapzen/open/core/DataUploadServiceTest.java index 313b6da8..cd9126a7 100644 --- a/src/test/java/com/mapzen/open/core/DataUploadServiceTest.java +++ b/src/test/java/com/mapzen/open/core/DataUploadServiceTest.java @@ -159,23 +159,6 @@ public void shouldGenerateGPX_shouldSubmit() throws Exception { eq(expectedRouteDescription)); } - @Test - public void shouldGenerateGPX_shouldNotSubmit() throws Exception { - Token token = new Token("stuff", "fun"); - app.setAccessToken(token); - - String expectedGroupId = "test_route"; - String expectedRouteDescription = "does not matter"; - fillLocationsTable(expectedGroupId, 4); - DataUploadService spy = spy(service); - spy.onStartCommand(null, 0, 0); - verify(spy).generateGpxXmlFor(expectedGroupId, expectedRouteDescription); - verify(spy).getDocument(expectedGroupId); - verify(spy, never()).submitCompressedFile(any(ByteArrayOutputStream.class), - eq(expectedGroupId), - eq(expectedRouteDescription)); - } - @Test public void shouldHaveLocationsFromAllRoutesInGroup() throws Exception { String groupId = "test-group-id";