Skip to content

Commit bc6449c

Browse files
committed
Remove check for minimum number of points (no longer needed)
1 parent 8037889 commit bc6449c

2 files changed

Lines changed: 0 additions & 22 deletions

File tree

src/main/java/com/mapzen/open/core/DataUploadService.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
import static org.apache.http.protocol.HTTP.UTF_8;
6969

7070
public class DataUploadService extends Service {
71-
private static final int MIN_NUM_TRACKING_POINTS = 10;
7271
private static final int MIN_RANGE_IN_METERS = 50;
7372

7473
private static final String RANGE_QUERY_EXT = " from "
@@ -217,10 +216,6 @@ public DOMSource getDocument(String groupId) {
217216
}
218217
trkElement.appendChild(trksegElement);
219218
Element documentElement = document.getDocumentElement();
220-
int numberOfPoints = documentElement.getElementsByTagName("ele").getLength();
221-
if (numberOfPoints < MIN_NUM_TRACKING_POINTS) {
222-
return null;
223-
}
224219
if (calculateMaxRange(groupId) < MIN_RANGE_IN_METERS) {
225220
return null;
226221
}

src/test/java/com/mapzen/open/core/DataUploadServiceTest.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -159,23 +159,6 @@ public void shouldGenerateGPX_shouldSubmit() throws Exception {
159159
eq(expectedRouteDescription));
160160
}
161161

162-
@Test
163-
public void shouldGenerateGPX_shouldNotSubmit() throws Exception {
164-
Token token = new Token("stuff", "fun");
165-
app.setAccessToken(token);
166-
167-
String expectedGroupId = "test_route";
168-
String expectedRouteDescription = "does not matter";
169-
fillLocationsTable(expectedGroupId, 4);
170-
DataUploadService spy = spy(service);
171-
spy.onStartCommand(null, 0, 0);
172-
verify(spy).generateGpxXmlFor(expectedGroupId, expectedRouteDescription);
173-
verify(spy).getDocument(expectedGroupId);
174-
verify(spy, never()).submitCompressedFile(any(ByteArrayOutputStream.class),
175-
eq(expectedGroupId),
176-
eq(expectedRouteDescription));
177-
}
178-
179162
@Test
180163
public void shouldHaveLocationsFromAllRoutesInGroup() throws Exception {
181164
String groupId = "test-group-id";

0 commit comments

Comments
 (0)