YUKI Hiroshi
null+****@clear*****
Wed Nov 14 18:17:27 JST 2012
YUKI Hiroshi 2012-11-14 18:17:27 +0900 (Wed, 14 Nov 2012) New Revision: 948cc9f3ac11b527b93d0f5b16bd5cc7f2a65551 https://github.com/groonga/gcs/commit/948cc9f3ac11b527b93d0f5b16bd5cc7f2a65551 Log: Handle "domain unexpectedly exists" error correctly Modified files: tools/run-scenarios tools/scenario-runner.js Modified: tools/run-scenarios (+4 -4) =================================================================== --- tools/run-scenarios 2012-11-14 17:55:27 +0900 (0a3bca6) +++ tools/run-scenarios 2012-11-14 18:17:27 +0900 (94f119d) @@ -102,10 +102,6 @@ runner.on('scenario', function(event) { console.log('Scenario file: ' + event.scenario.path); mkdirp.sync(event.scenario.resultsDir); - event.runner.on('error:fatal', function(event) { - commandLine.raiseFatalError(event.error); - }); - event.runner.on('end', function(event) { console.log(' Done. (elapsed time: ' + event.elapsedTime + 'msec)'); }); @@ -129,6 +125,10 @@ runner.on('end', function(event) { process.exit(0); }); +runner.on('error:fatal', function(event) { + commandLine.raiseFatalError(event.error); +}); + runner.on('error:status_unknown', function(event) { commandLine.raiseFatalError('Unknown status code ' + event.statusCode); }); Modified: tools/scenario-runner.js (+6 -0) =================================================================== --- tools/scenario-runner.js 2012-11-14 17:55:27 +0900 (c8b7f55) +++ tools/scenario-runner.js 2012-11-14 18:17:27 +0900 (39b63f5) @@ -26,6 +26,11 @@ ScenariosRunner.prototype._process = function(params) { var self = this; var runner = new ScenarioRunner(this.options); + + runner.on('error:fatal', function(event) { + self.emit('error:fatal', event); + }); + runner.on('start', function(event) { self.emit('scenario', { runner: runner, scenario: event.scenario }); @@ -39,6 +44,7 @@ ScenariosRunner.prototype._process = function(params) { } }); }); + runner.run(scenario); }; -------------- next part -------------- HTML����������������������������... Télécharger