Prune unnecessary cucumber code

This commit is contained in:
Lauren Budorick 2016-05-23 14:59:56 -04:00 committed by Patrick Niklaus
parent 823ee54f22
commit cbbeef5c46
No known key found for this signature in database
GPG Key ID: E426891B5F978B1B
2 changed files with 3 additions and 20 deletions

View File

@ -12,7 +12,8 @@ module.exports = function () {
throw new Error('*** routability table must contain either "forw", "backw" or "bothw" column');
}
this.reprocessAndLoadData(() => {
this.reprocessAndLoadData((e) => {
if (e) callback(e);
var testRow = (row, i, cb) => {
var outputRow = row;

View File

@ -1,7 +1,6 @@
'use strict';
var fs = require('fs');
var net = require('net');
var spawn = require('child_process').spawn;
var util = require('util');
var Timeout = require('node-timeout');
@ -15,9 +14,7 @@ var OSRMBaseLoader = class {
var limit = Timeout(this.scope.TIMEOUT, { err: this.scope.RoutedError('Launching osrm-routed timed out.') });
var runLaunch = (cb) => {
this.osrmUp(() => {
this.waitForConnection(cb);
});
this.osrmUp(cb);
};
runLaunch(limit((e) => { if (e) callback(e); else callback(); }));
@ -45,21 +42,6 @@ var OSRMBaseLoader = class {
} else callback(true);
}
waitForConnection (callback) {
net.connect({
port: this.scope.OSRM_PORT,
host: '127.0.0.1'
})
.on('connect', () => {
callback();
})
.on('error', (e) => {
setTimeout(() => {
callback(e);
}, 100);
});
}
waitForShutdown (callback) {
var check = () => {
if (!this.osrmIsRunning()) return callback();