Remove logging from scenario_manager

This commit is contained in:
LeeDr 2016-06-02 21:16:19 -05:00
parent 61f975c843
commit 1c43bf7e50

View file

@ -1,11 +1,8 @@
// import {
// common
// } from '../support';
var path = require('path');
var elasticsearch = require('elasticsearch');
var Promise = require('bluebird');
var config = require('./config').scenarios;
var common = require('../support/pages/common');
function ScenarioManager(server) {
if (!server) throw new Error('No server defined');
@ -30,7 +27,6 @@ ScenarioManager.prototype.load = function (id) {
var scenario = config[id];
if (!scenario) return Promise.reject('No scenario found for ' + id);
// common.debug('Loading data [' + id + '].....................');
return Promise.all(scenario.bulk.map(function mapBulk(bulk) {
var loadIndexDefinition;
if (bulk.indexDefinition) {
@ -62,9 +58,6 @@ ScenarioManager.prototype.load = function (id) {
);
}
})
.then(function () {
// common.debug('Finished loading [' + id + '].....................');
})
.catch(function (err) {
if (bulk.haltOnFailure === false) return;
throw err;
@ -88,9 +81,6 @@ ScenarioManager.prototype.unload = function (id) {
return this.client.indices.delete({
index: indices
})
.then(function () {
// common.debug('Deleted index [' + id + '].....................');
})
.catch(function (reason) {
// if the index never existed yet, or was already deleted it's OK
if (reason.message.indexOf('index_not_found_exception') < 0) {
@ -143,8 +133,6 @@ ScenarioManager.prototype.loadIfEmpty = function (id) {
.then(function handleCountResponse(response) {
if (response.count === 0) {
return self.load(id);
} else {
// common.debug('Found data [' + id + '] count = ' + response.count);
}
});
}))