Run cucumber in its own dataset namespace so it does not interfere
This commit is contained in:
parent
0e8b8b4901
commit
c4b90f52c0
@ -107,7 +107,8 @@ class OSRMDatastoreLoader extends OSRMBaseLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loadData (callback) {
|
loadData (callback) {
|
||||||
this.scope.runBin('osrm-datastore', this.inputFile, this.scope.environment, (err) => {
|
const command_arguments = util.format('--dataset-name=%s %s', this.scope.DATASET_NAME, this.inputFile);
|
||||||
|
this.scope.runBin('osrm-datastore', command_arguments, this.scope.environment, (err) => {
|
||||||
if (err) return callback(new Error('*** osrm-datastore exited with ' + err.code + ': ' + err));
|
if (err) return callback(new Error('*** osrm-datastore exited with ' + err.code + ': ' + err));
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
@ -116,7 +117,7 @@ class OSRMDatastoreLoader extends OSRMBaseLoader {
|
|||||||
osrmUp (callback) {
|
osrmUp (callback) {
|
||||||
if (this.osrmIsRunning()) return callback();
|
if (this.osrmIsRunning()) return callback();
|
||||||
|
|
||||||
const command_arguments = util.format('--shared-memory=1 -i %s -p %d -a %s', this.scope.OSRM_IP, this.scope.OSRM_PORT, this.scope.ROUTING_ALGORITHM);
|
const command_arguments = util.format('--dataset-name=%s -s -i %s -p %d -a %s', this.scope.DATASET_NAME, this.scope.OSRM_IP, this.scope.OSRM_PORT, this.scope.ROUTING_ALGORITHM);
|
||||||
this.child = this.scope.runBin('osrm-routed', command_arguments, this.scope.environment, (err) => {
|
this.child = this.scope.runBin('osrm-routed', command_arguments, this.scope.environment, (err) => {
|
||||||
if (err && err.signal !== 'SIGINT') {
|
if (err && err.signal !== 'SIGINT') {
|
||||||
this.child = null;
|
this.child = null;
|
||||||
|
@ -27,6 +27,7 @@ module.exports = function () {
|
|||||||
return callback(new Error('*** '+stxxl_config+ 'does not exist'));
|
return callback(new Error('*** '+stxxl_config+ 'does not exist'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.DATASET_NAME = 'cucumber';
|
||||||
this.PLATFORM_WINDOWS = process.platform.match(/^win.*/);
|
this.PLATFORM_WINDOWS = process.platform.match(/^win.*/);
|
||||||
this.DEFAULT_ENVIRONMENT = Object.assign({STXXLCFG: stxxl_config}, process.env);
|
this.DEFAULT_ENVIRONMENT = Object.assign({STXXLCFG: stxxl_config}, process.env);
|
||||||
this.DEFAULT_PROFILE = 'bicycle';
|
this.DEFAULT_PROFILE = 'bicycle';
|
||||||
|
Loading…
Reference in New Issue
Block a user