From 24fa94af59f63fbbaa6a73426988736e6a57be1d Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Thu, 17 Nov 2016 00:10:03 +0000 Subject: [PATCH] Remove obsolete test code --- features/bicycle/surface.feature | 2 +- features/step_definitions/routability.js | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/features/bicycle/surface.feature b/features/bicycle/surface.feature index 0485c9e6d..4450be76f 100644 --- a/features/bicycle/surface.feature +++ b/features/bicycle/surface.feature @@ -26,7 +26,7 @@ Feature: Bike - Surfaces Then routability should be | highway | surface | bothw | | cycleway | | 48 s | - | path | | 60 s | + | path | | 59.9 s +- 1 | | track | | 60 s | | track | asphalt | 60 s | | path | asphalt | 60 s | diff --git a/features/step_definitions/routability.js b/features/step_definitions/routability.js index 7aa93e1ff..4266ea576 100644 --- a/features/step_definitions/routability.js +++ b/features/step_definitions/routability.js @@ -127,23 +127,6 @@ module.exports = function () { var parseRes = (key, scb) => { if (result.forw[key] === result.backw[key]) { result.bothw[key] = result.forw[key]; - // FIXME these time and speed checks are stopgaps for precision errors in how - // OSRM returns inconsistent durations for rev/for requests along the same way - } else if (key === 'time') { - var range = [result.forw[key] - 1, result.forw[key] + 1]; - if (result.backw[key] >= range[0] && result.backw[key] <= range[1]) - // usually when we see minor differences here there's an integer - // duration value and one that comes back with a .9 or .1 rounding. - // This returns the integer one - result.bothw[key] = parseInt(result.forw[key]) === result.forw[key] ? result.forw[key] : result.backw[key]; - else - result.bothw[key] = 'diff'; - } else if (key === 'speed') { - if (Math.abs(result.backw.time - result.forw.time) < 0.2) { - result.bothw[key] = parseInt(result.forw[key]) === result.forw[key] ? result.forw[key] : result.backw[key]; - } else { - result.bothw[key] = 'diff'; - } } else { result.bothw[key] = 'diff'; }