improved stream mocks for older versions and increased compatabity from 0.8 up

This commit is contained in:
Spencer Alger
2013-12-12 20:07:31 -07:00
parent de25e652cf
commit dea18fcd7d
19 changed files with 352 additions and 16464 deletions

3
.gitignore vendored
View File

@ -10,5 +10,6 @@ test/integration/yaml_suite/log
scripts/last_rest_spec_update.sha
test/integration/yaml_suite/yaml_tests.json
test/browser_integration/yaml_tests.js
test-output-*.xml
junit-*.xml
test.log
coverage.html

View File

@ -1,7 +1,7 @@
module.exports = function (grunt) {
grunt.registerTask('browser_clients_publish', [
'build_browser_clients',
'browser_clients_build',
'compress:dist_zip',
'compress:dist_tarball',
's3:latest'

View File

@ -1,10 +1,20 @@
module.exports = function (grunt) {
grunt.registerTask('browser_clients_release', [
'build_browser_clients',
'prompt:confirm_release',
'check_for_confirmation',
'browser_clients_build',
'compress:dist_zip',
'compress:dist_tarball',
's3:release'
]);
grunt.registerTask('check_for_confirmation', function () {
if (grunt.config.get('confirm.release')) {
grunt.verbose.log('release confirmed');
} else {
throw new Error('Aborting release');
}
});
};

12
grunt/config/prompt.js Normal file
View File

@ -0,0 +1,12 @@
module.exports = {
confirm_release: {
options: {
questions: [{
config: 'confirm.release',
type: 'confirm',
message: 'Are you sure you want to overwrite/release version <%= package.version %> of elasticsearch-js',
default: false
}]
}
}
};

View File

@ -47,7 +47,9 @@
"relative-fs": "0.0.1",
"grunt-contrib-compress": "~0.5.3",
"grunt-contrib-copy": "~0.4.1",
"grunt-mocha": "~0.4.7"
"grunt-mocha": "~0.4.7",
"grunt-prompt": "~0.1.2",
"readable-stream": "~1.1.9"
},
"license": "Apache 2.0",
"dependencies": {

View File

@ -15,7 +15,7 @@ module.exports = function (argv, steps) {
}
var tasks = {
exec: function (params, exitCb) {
exec: function (params, done) {
var cmd = params.cmd;
var opts = {};
@ -42,11 +42,11 @@ module.exports = function (argv, steps) {
}
console.log(stdout);
}
exitCb();
done();
}
});
},
run: function (params, exitCb) {
run: function (params, done) {
var cmd = params.cmd;
var args = params.args || [];
var opts = {
@ -71,9 +71,12 @@ module.exports = function (argv, steps) {
console.error('Error! --', cmd, 'exit status was', status);
process.exit(1);
} else {
exitCb();
done();
}
});
},
runInModule: function (params, done) {
},
copy: function (params, done) {
var from = params.from;

View File

@ -19,22 +19,18 @@ a.esdoc(href="<%= action.docUrl %>", title="Endpoint Docs")
h4 Params:
ul.params.api
<% _.each(action.allParams, function (param, paramName) { %>
li
code.name <%= paramWithDefault(paramName, param.default) %>
<%=
_.map(
('<span class="types">' + paramType(param.type) + '</span> ' + (param.description || '')).split('\n'),
function (line) {
return '| ' + line + '\n';
}
).join('\n')
%>
<% }); %>
li.
<code class="name"><%= paramWithDefault(paramName, param.default) %></code> <span class="types"><%=
paramType(param.type) %></span>
<%= indent(4, param.description || '') %><%
}); %>
li <a href="#api-conventions-params">the usual</a>
h4 Method: <code><%= action.spec.method || 'GET' %></code>
h4 Returns:
p: a(href="#api-conventions-return") the usual<%
p: a(href="#api-conventions-return") the usual
include _examples/<%= action.name %><%
});
%>

View File

@ -394,8 +394,16 @@ _.getUnwrittenFromStream = function (stream) {
var writeBuffer = stream._writableState.buffer;
var out = '';
if (writeBuffer.length) {
writeBuffer.forEach(function (buffered) {
out += buffered.chunk.toString();
_.each(writeBuffer, function (writeReq) {
if (writeReq.chunk) {
// 0.9.12+ uses WriteReq objects with a chunk prop
out += '' + writeReq.chunk;
} else if (_.isArray(writeReq) && (typeof writeReq[0] === 'string' || Buffer.isBuffer(writeReq[0]))) {
// 0.9.4 - 0.9.9 buffers are arrays of arrays like [[chunk, cb], [chunk, undef], ...].
out += '' + writeReq[0];
} else {
return false;
}
});
}
return out;

View File

@ -23421,27 +23421,30 @@ var argv = require('./argv');
var testDir = path.resolve(__dirname, './tests');
var doPattern = new Minimatch(argv.match);
// before running any tests...
before(function (done) {
// start our personal ES Server
this.timeout(null);
clientManager.create(done);
});
describe('yaml -', function () {
before(function (done) {
// make sure ES is empty
clientManager.get().indices.delete({
index: '*',
ignore: 404
}, done);
});
// before running any tests...
before(function (done) {
// start our personal ES Server
this.timeout(null);
clientManager.create(done);
});
var files = _.map(require('./yaml_tests.json'), function (docs, filename) {
if (doPattern.match(filename)) {
return new YamlFile(filename, docs);
}
});
before(function (done) {
// make sure ES is empty
clientManager.get().indices.delete({
index: '*',
ignore: 404
}, done);
});
var files = _.map(require('./yaml_tests.json'), function (docs, filename) {
if (doPattern.match(filename)) {
return new YamlFile(filename, docs);
}
});
});
},{"../../../src/elasticsearch":2,"../../../src/lib/utils":52,"./argv":53,"./client_manager":54,"./yaml_file":58,"./yaml_tests.json":59,"async":1,"expect.js":15,"js-yaml":16,"minimatch":49,"path":8}],56:[function(require,module,exports){
var process=require("__browserify_process");var childProc = require('child_process');
var events = require('events');
@ -23731,7 +23734,9 @@ YamlDoc.prototype = {
log('getting', path, 'from', from);
var steps = path ? path.split('.') : [];
var steps = _.map(path ? path.replace(/\\\./g, '\uffff').split('.') : [], function (step) {
return step.replace(/\uffff/g, '.');
});
var remainingSteps;
for (i = 0; from != null && i < steps.length; i++) {

File diff suppressed because it is too large Load Diff

View File

@ -1,817 +0,0 @@
<testsuites>
<testsuite package="elasticsearch-js" id="0" name="Logger Abstract" timestamp="2013-12-12T23:04:56.201Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.027"/>
<testsuite package="elasticsearch-js" id="1" name="Logger Abstract #write" timestamp="2013-12-12T23:04:56.202Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.004">
<testcase name="requires that it is overwritten" time="0.001" classname="node v0.10.23.Logger Abstract #write"/>
</testsuite>
<testsuite package="elasticsearch-js" id="2" name="Logger Abstract Constuctor" timestamp="2013-12-12T23:04:56.206Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="calls setupListeners, passes its new levels" time="0.001" classname="node v0.10.23.Logger Abstract Constuctor"/>
<testcase name="listens for the loggers&apos; &quot;closing&quot; event" time="0" classname="node v0.10.23.Logger Abstract Constuctor"/>
</testsuite>
<testsuite package="elasticsearch-js" id="3" name="Logger Abstract listening levels" timestamp="2013-12-12T23:04:56.208Z" hostname="localhost" tests="7" failures="0" errors="0" time="0.007">
<testcase name="calls cleanUpListeners when the listeners are being setup" time="0.001" classname="node v0.10.23.Logger Abstract listening levels"/>
<testcase name="listens to just error when log is explicitly error" time="0" classname="node v0.10.23.Logger Abstract listening levels"/>
<testcase name="listens for all the events when level is &quot;trace&quot;" time="0" classname="node v0.10.23.Logger Abstract listening levels"/>
<testcase name="listens for specific events when level is an array" time="0" classname="node v0.10.23.Logger Abstract listening levels"/>
<testcase name="sets the logLevel property to the new levels" time="0.001" classname="node v0.10.23.Logger Abstract listening levels"/>
<testcase name="rejects listening levels it can not listen to" time="0" classname="node v0.10.23.Logger Abstract listening levels"/>
<testcase name="emits events because something is listening" time="0.001" classname="node v0.10.23.Logger Abstract listening levels"/>
</testsuite>
<testsuite package="elasticsearch-js" id="4" name="Logger Abstract #timestamp" timestamp="2013-12-12T23:04:56.215Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="returns in the right format" time="0.001" classname="node v0.10.23.Logger Abstract #timestamp"/>
</testsuite>
<testsuite package="elasticsearch-js" id="5" name="Logger Abstract #format" timestamp="2013-12-12T23:04:56.216Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="returns a single string with the message indented" time="0" classname="node v0.10.23.Logger Abstract #format"/>
<testcase name="properly indents multi-line messages" time="0" classname="node v0.10.23.Logger Abstract #format"/>
</testsuite>
<testsuite package="elasticsearch-js" id="6" name="Logger Abstract #onError" timestamp="2013-12-12T23:04:56.218Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="uses the Error name when it is not just &quot;Error&quot;" time="0.002" classname="node v0.10.23.Logger Abstract #onError"/>
<testcase name="uses &quot;ERROR&quot; when the error name is &quot;Error&quot;" time="0.001" classname="node v0.10.23.Logger Abstract #onError"/>
</testsuite>
<testsuite package="elasticsearch-js" id="7" name="Logger Abstract #onWarning" timestamp="2013-12-12T23:04:56.221Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the &quot;WARNING&quot; label" time="0" classname="node v0.10.23.Logger Abstract #onWarning"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Logger Abstract #onWarning"/>
</testsuite>
<testsuite package="elasticsearch-js" id="8" name="Logger Abstract #onInfo" timestamp="2013-12-12T23:04:56.222Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.004">
<testcase name="uses the &quot;INFO&quot; label" time="0.001" classname="node v0.10.23.Logger Abstract #onInfo"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Logger Abstract #onInfo"/>
</testsuite>
<testsuite package="elasticsearch-js" id="9" name="Logger Abstract #onDebug" timestamp="2013-12-12T23:04:56.226Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the &quot;DEBUG&quot; label" time="0" classname="node v0.10.23.Logger Abstract #onDebug"/>
<testcase name="echos the message" time="0.001" classname="node v0.10.23.Logger Abstract #onDebug"/>
</testsuite>
<testsuite package="elasticsearch-js" id="10" name="Logger Abstract #onTrace" timestamp="2013-12-12T23:04:56.227Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the &quot;TRACE&quot; label" time="0" classname="node v0.10.23.Logger Abstract #onTrace"/>
<testcase name="joins the message and curl call with a newline" time="0" classname="node v0.10.23.Logger Abstract #onTrace"/>
</testsuite>
<testsuite package="elasticsearch-js" id="11" name="Client instances creation" timestamp="2013-12-12T23:04:56.228Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.006">
<testcase name="inherits the api" time="0" classname="node v0.10.23.Client instances creation"/>
<testcase name="closing the client causes it&apos;s transport to be closed" time="0" classname="node v0.10.23.Client instances creation"/>
<testcase name="creates a warning level logger by default" time="0" classname="node v0.10.23.Client instances creation"/>
</testsuite>
<testsuite package="elasticsearch-js" id="12" name="Client Action runner" timestamp="2013-12-12T23:04:56.234Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.05"/>
<testsuite package="elasticsearch-js" id="13" name="Client Action runner argument juggling" timestamp="2013-12-12T23:04:56.234Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.002">
<testcase name="creates an empty param set when no params are sent" time="0.002" classname="node v0.10.23.Client Action runner argument juggling"/>
</testsuite>
<testsuite package="elasticsearch-js" id="14" name="Client Action runner clientAction::proxy" timestamp="2013-12-12T23:04:56.236Z" hostname="localhost" tests="5" failures="0" errors="0" time="0.003">
<testcase name="proxies to the passed function" time="0.001" classname="node v0.10.23.Client Action runner clientAction::proxy"/>
<testcase name="provides the proper context" time="0" classname="node v0.10.23.Client Action runner clientAction::proxy"/>
<testcase name="handles passing just the callback" time="0" classname="node v0.10.23.Client Action runner clientAction::proxy"/>
<testcase name="supports a param transformation function" time="0" classname="node v0.10.23.Client Action runner clientAction::proxy"/>
<testcase name="returns the proxied function&apos;s return value" time="0" classname="node v0.10.23.Client Action runner clientAction::proxy"/>
</testsuite>
<testsuite package="elasticsearch-js" id="15" name="Client Action runner param casting" timestamp="2013-12-12T23:04:56.240Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.029"/>
<testsuite package="elasticsearch-js" id="16" name="Client Action runner param casting duration" timestamp="2013-12-12T23:04:56.240Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.004">
<testcase name="accepts a number, string, or interval" time="0.001" classname="node v0.10.23.Client Action runner param casting duration"/>
<testcase name="rejects date values" time="0.001" classname="node v0.10.23.Client Action runner param casting duration"/>
<testcase name="rejects array" time="0.001" classname="node v0.10.23.Client Action runner param casting duration"/>
<testcase name="rejects object" time="0" classname="node v0.10.23.Client Action runner param casting duration"/>
</testsuite>
<testsuite package="elasticsearch-js" id="17" name="Client Action runner param casting list" timestamp="2013-12-12T23:04:56.244Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.003">
<testcase name="accepts a string, number, or array" time="0" classname="node v0.10.23.Client Action runner param casting list"/>
<testcase name="it rejects regexp" time="0" classname="node v0.10.23.Client Action runner param casting list"/>
<testcase name="it rejects objects" time="0" classname="node v0.10.23.Client Action runner param casting list"/>
</testsuite>
<testsuite package="elasticsearch-js" id="18" name="Client Action runner param casting enum" timestamp="2013-12-12T23:04:56.247Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.003">
<testcase name="accepts any value in the list" time="0.001" classname="node v0.10.23.Client Action runner param casting enum"/>
<testcase name="accepts any value kind of in the list" time="0.001" classname="node v0.10.23.Client Action runner param casting enum"/>
<testcase name="it rejects things not in the list" time="0" classname="node v0.10.23.Client Action runner param casting enum"/>
</testsuite>
<testsuite package="elasticsearch-js" id="19" name="Client Action runner param casting boolean" timestamp="2013-12-12T23:04:56.250Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="casts &quot;off&quot;, &quot;no&quot;, and other falsey things to false" time="0.001" classname="node v0.10.23.Client Action runner param casting boolean"/>
<testcase name="cast most everything else to true" time="0.001" classname="node v0.10.23.Client Action runner param casting boolean"/>
</testsuite>
<testsuite package="elasticsearch-js" id="20" name="Client Action runner param casting number" timestamp="2013-12-12T23:04:56.252Z" hostname="localhost" tests="6" failures="0" errors="0" time="0.005">
<testcase name="casts integers properly" time="0.001" classname="node v0.10.23.Client Action runner param casting number"/>
<testcase name="casts floats properly" time="0" classname="node v0.10.23.Client Action runner param casting number"/>
<testcase name="rejects dates" time="0.001" classname="node v0.10.23.Client Action runner param casting number"/>
<testcase name="rejects objects" time="0.001" classname="node v0.10.23.Client Action runner param casting number"/>
<testcase name="rejects arrays" time="0" classname="node v0.10.23.Client Action runner param casting number"/>
<testcase name="rejects regexp" time="0" classname="node v0.10.23.Client Action runner param casting number"/>
</testsuite>
<testsuite package="elasticsearch-js" id="21" name="Client Action runner param casting string" timestamp="2013-12-12T23:04:56.257Z" hostname="localhost" tests="5" failures="0" errors="0" time="0.008">
<testcase name="accepts numbers and strings" time="0" classname="node v0.10.23.Client Action runner param casting string"/>
<testcase name="rejects dates" time="0.001" classname="node v0.10.23.Client Action runner param casting string"/>
<testcase name="rejects objects" time="0.001" classname="node v0.10.23.Client Action runner param casting string"/>
<testcase name="rejects arrays" time="0.001" classname="node v0.10.23.Client Action runner param casting string"/>
<testcase name="rejects regexp" time="0" classname="node v0.10.23.Client Action runner param casting string"/>
</testsuite>
<testsuite package="elasticsearch-js" id="22" name="Client Action runner param casting time" timestamp="2013-12-12T23:04:56.265Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.004">
<testcase name="accepts numbers, strings, and dates" time="0" classname="node v0.10.23.Client Action runner param casting time"/>
<testcase name="rejects objects" time="0" classname="node v0.10.23.Client Action runner param casting time"/>
<testcase name="rejects arrays" time="0" classname="node v0.10.23.Client Action runner param casting time"/>
<testcase name="rejects regexp" time="0.001" classname="node v0.10.23.Client Action runner param casting time"/>
</testsuite>
<testsuite package="elasticsearch-js" id="23" name="Client Action runner passing of control params from spec" timestamp="2013-12-12T23:04:56.269Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="passes bulkBody" time="0" classname="node v0.10.23.Client Action runner passing of control params from spec"/>
<testcase name="passes castExists" time="0.001" classname="node v0.10.23.Client Action runner passing of control params from spec"/>
</testsuite>
<testsuite package="elasticsearch-js" id="24" name="Client Action runner body handling" timestamp="2013-12-12T23:04:56.271Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="passed the body when it is set" time="0" classname="node v0.10.23.Client Action runner body handling"/>
<testcase name="errors when the body is not set but required" time="0.001" classname="node v0.10.23.Client Action runner body handling"/>
</testsuite>
<testsuite package="elasticsearch-js" id="25" name="Client Action runner passing of http method" timestamp="2013-12-12T23:04:56.273Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uppercases and passed the default method" time="0" classname="node v0.10.23.Client Action runner passing of http method"/>
<testcase name="uppercases and passed the default method" time="0" classname="node v0.10.23.Client Action runner passing of http method"/>
</testsuite>
<testsuite package="elasticsearch-js" id="26" name="Client Action runner passing of ignore param" timestamp="2013-12-12T23:04:56.275Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="passes ignore as an array" time="0" classname="node v0.10.23.Client Action runner passing of ignore param"/>
</testsuite>
<testsuite package="elasticsearch-js" id="27" name="Client Action runner passing requestTimeout" timestamp="2013-12-12T23:04:56.276Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.002">
<testcase name="passes passes the spec value by default" time="0" classname="node v0.10.23.Client Action runner passing requestTimeout"/>
<testcase name="passes the provided value" time="0.001" classname="node v0.10.23.Client Action runner passing requestTimeout"/>
<testcase name="passes nothing be default" time="0.001" classname="node v0.10.23.Client Action runner passing requestTimeout"/>
</testsuite>
<testsuite package="elasticsearch-js" id="28" name="Client Action runner url resolver" timestamp="2013-12-12T23:04:56.278Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.002">
<testcase name="rejects a url if it required params that are not present" time="0" classname="node v0.10.23.Client Action runner url resolver"/>
<testcase name="uses the default value for optional params" time="0" classname="node v0.10.23.Client Action runner url resolver"/>
<testcase name="casts both optional and required args" time="0" classname="node v0.10.23.Client Action runner url resolver"/>
</testsuite>
<testsuite package="elasticsearch-js" id="29" name="Client Action runner param collection" timestamp="2013-12-12T23:04:56.280Z" hostname="localhost" tests="5" failures="0" errors="0" time="0.004">
<testcase name="collects all of the params into params.query" time="0" classname="node v0.10.23.Client Action runner param collection"/>
<testcase name="includes extra params" time="0" classname="node v0.10.23.Client Action runner param collection"/>
<testcase name="excludes default values" time="0" classname="node v0.10.23.Client Action runner param collection"/>
<testcase name="does not include non-query param keys" time="0" classname="node v0.10.23.Client Action runner param collection"/>
<testcase name="enforces required params" time="0" classname="node v0.10.23.Client Action runner param collection"/>
</testsuite>
<testsuite package="elasticsearch-js" id="30" name="Connection Abstract" timestamp="2013-12-12T23:04:56.284Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.01">
<testcase name="constructs with defaults for deadTimeout, requestCount, host, and bound" time="0" classname="node v0.10.23.Connection Abstract"/>
<testcase name="requires a valid host" time="0" classname="node v0.10.23.Connection Abstract"/>
<testcase name="required that the request method is overridden" time="0" classname="node v0.10.23.Connection Abstract"/>
</testsuite>
<testsuite package="elasticsearch-js" id="31" name="Connection Abstract #ping" timestamp="2013-12-12T23:04:56.287Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="requires a callback" time="0" classname="node v0.10.23.Connection Abstract #ping"/>
<testcase name="calls it&apos;s own request method" time="0" classname="node v0.10.23.Connection Abstract #ping"/>
</testsuite>
<testsuite package="elasticsearch-js" id="32" name="Connection Abstract #setStatus" timestamp="2013-12-12T23:04:56.288Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.003">
<testcase name="emits the &quot;status set&quot; event with `new`, `old` &amp; `conn` args" time="0.001" classname="node v0.10.23.Connection Abstract #setStatus"/>
<testcase name="stores the status in this.status" time="0" classname="node v0.10.23.Connection Abstract #setStatus"/>
<testcase name="sets a timeout when set to dead, and removed when alive" time="0" classname="node v0.10.23.Connection Abstract #setStatus"/>
</testsuite>
<testsuite package="elasticsearch-js" id="33" name="Connection Abstract #resuscitate" timestamp="2013-12-12T23:04:56.291Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.003">
<testcase name="should not ping the connection unless it is still dead" time="0" classname="node v0.10.23.Connection Abstract #resuscitate"/>
<testcase name="should ping the connection after the deadTimeout, and set the status to &quot;alive&quot; on pong" time="0" classname="node v0.10.23.Connection Abstract #resuscitate"/>
<testcase name="should ping the connection after the deadTimeout, and set the status to &quot;dead&quot; on error" time="0.001" classname="node v0.10.23.Connection Abstract #resuscitate"/>
</testsuite>
<testsuite package="elasticsearch-js" id="34" name="Connection Pool" timestamp="2013-12-12T23:04:56.294Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.022"/>
<testsuite package="elasticsearch-js" id="35" name="Connection Pool Adding/Removing/Syncing Connections" timestamp="2013-12-12T23:04:56.294Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.005">
<testcase name="#addConnection only adds the connection if it doesn&apos;t already exist" time="0" classname="node v0.10.23.Connection Pool Adding/Removing/Syncing Connections"/>
<testcase name="#setHosts syncs the list of Hosts with the connections in the index" time="0.001" classname="node v0.10.23.Connection Pool Adding/Removing/Syncing Connections"/>
</testsuite>
<testsuite package="elasticsearch-js" id="36" name="Connection Pool Adding/Removing/Syncing Connections #removeConnection" timestamp="2013-12-12T23:04:56.298Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="removes the connection if it exist" time="0" classname="node v0.10.23.Connection Pool Adding/Removing/Syncing Connections #removeConnection"/>
<testcase name="closes the connection when it removes it" time="0" classname="node v0.10.23.Connection Pool Adding/Removing/Syncing Connections #removeConnection"/>
</testsuite>
<testsuite package="elasticsearch-js" id="37" name="Connection Pool Connection selection" timestamp="2013-12-12T23:04:56.299Z" hostname="localhost" tests="5" failures="0" errors="0" time="0.008">
<testcase name="detects if the selector is async" time="0" classname="node v0.10.23.Connection Pool Connection selection"/>
<testcase name="detects if the selector is not async" time="0" classname="node v0.10.23.Connection Pool Connection selection"/>
<testcase name="sync selectors should still return async" time="0" classname="node v0.10.23.Connection Pool Connection selection"/>
<testcase name="should catch errors in sync selectors" time="0.001" classname="node v0.10.23.Connection Pool Connection selection"/>
<testcase name="should automatically select the first dead connection when there no living connections" time="0" classname="node v0.10.23.Connection Pool Connection selection"/>
</testsuite>
<testsuite package="elasticsearch-js" id="38" name="Connection Pool Connection state management" timestamp="2013-12-12T23:04:56.307Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.009">
<testcase name="moves an alive connection to dead" time="0" classname="node v0.10.23.Connection Pool Connection state management"/>
<testcase name="moves a dead connection to the end of the dead list when it re-dies" time="0" classname="node v0.10.23.Connection Pool Connection state management"/>
<testcase name="does nothing when a connection is re-alive" time="0" classname="node v0.10.23.Connection Pool Connection state management"/>
<testcase name="removes all its connection when it closes, causing them to be closed" time="0" classname="node v0.10.23.Connection Pool Connection state management"/>
</testsuite>
<testsuite package="elasticsearch-js" id="39" name="Console Logger" timestamp="2013-12-12T23:04:56.316Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.015">
<testcase name="checks before using unique logging functions, falls back to #log()" time="0.001" classname="node v0.10.23.Console Logger"/>
</testsuite>
<testsuite package="elasticsearch-js" id="40" name="Console Logger Constuctor" timestamp="2013-12-12T23:04:56.317Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="calls setupListeners, passes its new levels" time="0.001" classname="node v0.10.23.Console Logger Constuctor"/>
<testcase name="listens for the loggers&apos; &quot;closing&quot; event" time="0" classname="node v0.10.23.Console Logger Constuctor"/>
</testsuite>
<testsuite package="elasticsearch-js" id="41" name="Console Logger listening levels" timestamp="2013-12-12T23:04:56.318Z" hostname="localhost" tests="7" failures="0" errors="0" time="0.004">
<testcase name="calls cleanUpListeners when the listeners are being setup" time="0.001" classname="node v0.10.23.Console Logger listening levels"/>
<testcase name="listens to just error when log is explicitly error" time="0" classname="node v0.10.23.Console Logger listening levels"/>
<testcase name="listens for all the events when level is &quot;trace&quot;" time="0" classname="node v0.10.23.Console Logger listening levels"/>
<testcase name="listens for specific events when level is an array" time="0" classname="node v0.10.23.Console Logger listening levels"/>
<testcase name="sets the logLevel property to the new levels" time="0" classname="node v0.10.23.Console Logger listening levels"/>
<testcase name="rejects listening levels it can not listen to" time="0" classname="node v0.10.23.Console Logger listening levels"/>
<testcase name="emits events because something is listening" time="0.001" classname="node v0.10.23.Console Logger listening levels"/>
</testsuite>
<testsuite package="elasticsearch-js" id="42" name="Console Logger #timestamp" timestamp="2013-12-12T23:04:56.322Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="returns in the right format" time="0" classname="node v0.10.23.Console Logger #timestamp"/>
</testsuite>
<testsuite package="elasticsearch-js" id="43" name="Console Logger #format" timestamp="2013-12-12T23:04:56.323Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="returns a single string with the message indented" time="0" classname="node v0.10.23.Console Logger #format"/>
<testcase name="properly indents multi-line messages" time="0" classname="node v0.10.23.Console Logger #format"/>
</testsuite>
<testsuite package="elasticsearch-js" id="44" name="Console Logger #onError" timestamp="2013-12-12T23:04:56.324Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the Error name when it is not just &quot;Error&quot;" time="0" classname="node v0.10.23.Console Logger #onError"/>
<testcase name="uses &quot;ERROR&quot; when the error name is &quot;Error&quot;" time="0" classname="node v0.10.23.Console Logger #onError"/>
</testsuite>
<testsuite package="elasticsearch-js" id="45" name="Console Logger #onWarning" timestamp="2013-12-12T23:04:56.325Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the &quot;WARNING&quot; label" time="0.001" classname="node v0.10.23.Console Logger #onWarning"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Console Logger #onWarning"/>
</testsuite>
<testsuite package="elasticsearch-js" id="46" name="Console Logger #onInfo" timestamp="2013-12-12T23:04:56.326Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;INFO&quot; label" time="0" classname="node v0.10.23.Console Logger #onInfo"/>
<testcase name="echos the message" time="0.001" classname="node v0.10.23.Console Logger #onInfo"/>
</testsuite>
<testsuite package="elasticsearch-js" id="47" name="Console Logger #onDebug" timestamp="2013-12-12T23:04:56.328Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;DEBUG&quot; label" time="0.001" classname="node v0.10.23.Console Logger #onDebug"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Console Logger #onDebug"/>
</testsuite>
<testsuite package="elasticsearch-js" id="48" name="Console Logger #onTrace" timestamp="2013-12-12T23:04:56.330Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the &quot;TRACE&quot; label" time="0" classname="node v0.10.23.Console Logger #onTrace"/>
<testcase name="joins the message and curl call with a newline" time="0" classname="node v0.10.23.Console Logger #onTrace"/>
</testsuite>
<testsuite package="elasticsearch-js" id="49" name="301" timestamp="2013-12-12T23:04:56.331Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.301"/>
</testsuite>
<testsuite package="elasticsearch-js" id="50" name="400" timestamp="2013-12-12T23:04:56.331Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.400"/>
</testsuite>
<testsuite package="elasticsearch-js" id="51" name="403" timestamp="2013-12-12T23:04:56.332Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.403"/>
</testsuite>
<testsuite package="elasticsearch-js" id="52" name="404" timestamp="2013-12-12T23:04:56.333Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.404"/>
</testsuite>
<testsuite package="elasticsearch-js" id="53" name="409" timestamp="2013-12-12T23:04:56.333Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.409"/>
</testsuite>
<testsuite package="elasticsearch-js" id="54" name="412" timestamp="2013-12-12T23:04:56.334Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.412"/>
</testsuite>
<testsuite package="elasticsearch-js" id="55" name="500" timestamp="2013-12-12T23:04:56.334Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.500"/>
</testsuite>
<testsuite package="elasticsearch-js" id="56" name="503" timestamp="2013-12-12T23:04:56.335Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.003">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.503"/>
</testsuite>
<testsuite package="elasticsearch-js" id="57" name="ConnectionFault" timestamp="2013-12-12T23:04:56.338Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.ConnectionFault"/>
</testsuite>
<testsuite package="elasticsearch-js" id="58" name="NoConnections" timestamp="2013-12-12T23:04:56.339Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.NoConnections"/>
</testsuite>
<testsuite package="elasticsearch-js" id="59" name="Generic" timestamp="2013-12-12T23:04:56.339Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.Generic"/>
</testsuite>
<testsuite package="elasticsearch-js" id="60" name="RequestTimeout" timestamp="2013-12-12T23:04:56.340Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.RequestTimeout"/>
</testsuite>
<testsuite package="elasticsearch-js" id="61" name="Serialization" timestamp="2013-12-12T23:04:56.340Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.Serialization"/>
</testsuite>
<testsuite package="elasticsearch-js" id="62" name="MovedPermanently" timestamp="2013-12-12T23:04:56.340Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.MovedPermanently"/>
</testsuite>
<testsuite package="elasticsearch-js" id="63" name="BadRequest" timestamp="2013-12-12T23:04:56.341Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.BadRequest"/>
</testsuite>
<testsuite package="elasticsearch-js" id="64" name="Forbidden" timestamp="2013-12-12T23:04:56.342Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.Forbidden"/>
</testsuite>
<testsuite package="elasticsearch-js" id="65" name="NotFound" timestamp="2013-12-12T23:04:56.342Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.NotFound"/>
</testsuite>
<testsuite package="elasticsearch-js" id="66" name="Conflict" timestamp="2013-12-12T23:04:56.343Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.Conflict"/>
</testsuite>
<testsuite package="elasticsearch-js" id="67" name="PreconditionFailed" timestamp="2013-12-12T23:04:56.343Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.PreconditionFailed"/>
</testsuite>
<testsuite package="elasticsearch-js" id="68" name="InternalServerError" timestamp="2013-12-12T23:04:56.344Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.InternalServerError"/>
</testsuite>
<testsuite package="elasticsearch-js" id="69" name="ServiceUnavailable" timestamp="2013-12-12T23:04:56.344Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="extend the ErrorAbstract and Error classes" time="0" classname="node v0.10.23.ServiceUnavailable"/>
</testsuite>
<testsuite package="elasticsearch-js" id="70" name="Error Abstract" timestamp="2013-12-12T23:04:56.345Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="provides a stack property in the browser" time="0" classname="node v0.10.23.Error Abstract"/>
</testsuite>
<testsuite package="elasticsearch-js" id="71" name="File Logger" timestamp="2013-12-12T23:04:56.345Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.021"/>
<testsuite package="elasticsearch-js" id="72" name="File Logger Constuctor" timestamp="2013-12-12T23:04:56.345Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="calls setupListeners, passes its new levels" time="0.001" classname="node v0.10.23.File Logger Constuctor"/>
<testcase name="listens for the loggers&apos; &quot;closing&quot; event" time="0" classname="node v0.10.23.File Logger Constuctor"/>
</testsuite>
<testsuite package="elasticsearch-js" id="73" name="File Logger listening levels" timestamp="2013-12-12T23:04:56.348Z" hostname="localhost" tests="7" failures="0" errors="0" time="0.005">
<testcase name="calls cleanUpListeners when the listeners are being setup" time="0" classname="node v0.10.23.File Logger listening levels"/>
<testcase name="listens to just error when log is explicitly error" time="0" classname="node v0.10.23.File Logger listening levels"/>
<testcase name="listens for all the events when level is &quot;trace&quot;" time="0" classname="node v0.10.23.File Logger listening levels"/>
<testcase name="listens for specific events when level is an array" time="0.001" classname="node v0.10.23.File Logger listening levels"/>
<testcase name="sets the logLevel property to the new levels" time="0" classname="node v0.10.23.File Logger listening levels"/>
<testcase name="rejects listening levels it can not listen to" time="0" classname="node v0.10.23.File Logger listening levels"/>
<testcase name="emits events because something is listening" time="0.001" classname="node v0.10.23.File Logger listening levels"/>
</testsuite>
<testsuite package="elasticsearch-js" id="74" name="File Logger #timestamp" timestamp="2013-12-12T23:04:56.353Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="returns in the right format" time="0.001" classname="node v0.10.23.File Logger #timestamp"/>
</testsuite>
<testsuite package="elasticsearch-js" id="75" name="File Logger #format" timestamp="2013-12-12T23:04:56.354Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="returns a single string with the message indented" time="0" classname="node v0.10.23.File Logger #format"/>
<testcase name="properly indents multi-line messages" time="0.001" classname="node v0.10.23.File Logger #format"/>
</testsuite>
<testsuite package="elasticsearch-js" id="76" name="File Logger #onError" timestamp="2013-12-12T23:04:56.356Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the Error name when it is not just &quot;Error&quot;" time="0.001" classname="node v0.10.23.File Logger #onError"/>
<testcase name="uses &quot;ERROR&quot; when the error name is &quot;Error&quot;" time="0.001" classname="node v0.10.23.File Logger #onError"/>
</testsuite>
<testsuite package="elasticsearch-js" id="77" name="File Logger #onWarning" timestamp="2013-12-12T23:04:56.358Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;WARNING&quot; label" time="0.001" classname="node v0.10.23.File Logger #onWarning"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.File Logger #onWarning"/>
</testsuite>
<testsuite package="elasticsearch-js" id="78" name="File Logger #onInfo" timestamp="2013-12-12T23:04:56.360Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;INFO&quot; label" time="0" classname="node v0.10.23.File Logger #onInfo"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.File Logger #onInfo"/>
</testsuite>
<testsuite package="elasticsearch-js" id="79" name="File Logger #onDebug" timestamp="2013-12-12T23:04:56.362Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the &quot;DEBUG&quot; label" time="0" classname="node v0.10.23.File Logger #onDebug"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.File Logger #onDebug"/>
</testsuite>
<testsuite package="elasticsearch-js" id="80" name="File Logger #onTrace" timestamp="2013-12-12T23:04:56.363Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the &quot;TRACE&quot; label" time="0" classname="node v0.10.23.File Logger #onTrace"/>
<testcase name="joins the message and curl call with a newline" time="0" classname="node v0.10.23.File Logger #onTrace"/>
</testsuite>
<testsuite package="elasticsearch-js" id="81" name="File Logger buffer flush" timestamp="2013-12-12T23:04:56.364Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.002">
<testcase name="writes everything in the buffer to console.error" time="0.001" classname="node v0.10.23.File Logger buffer flush"/>
</testsuite>
<testsuite package="elasticsearch-js" id="82" name="Host class" timestamp="2013-12-12T23:04:56.367Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.009"/>
<testsuite package="elasticsearch-js" id="83" name="Host class construction" timestamp="2013-12-12T23:04:56.367Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.007">
<testcase name="properly sets the defaults" time="0" classname="node v0.10.23.Host class construction"/>
<testcase name="accepts a string for query" time="0.001" classname="node v0.10.23.Host class construction"/>
<testcase name="accepts other generic params" time="0" classname="node v0.10.23.Host class construction"/>
<testcase name="ignores anything that&apos;s not a string or object-y" time="0.001" classname="node v0.10.23.Host class construction"/>
</testsuite>
<testsuite package="elasticsearch-js" id="84" name="Host class construction from a string" timestamp="2013-12-12T23:04:56.371Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="accepts a string for the entire url" time="0.001" classname="node v0.10.23.Host class construction from a string"/>
<testcase name="uses the default port based on the protocol" time="0" classname="node v0.10.23.Host class construction from a string"/>
</testsuite>
<testsuite package="elasticsearch-js" id="85" name="Host class construction based on the output from url.parse" timestamp="2013-12-12T23:04:56.372Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="might cause weird things to happen" time="0" classname="node v0.10.23.Host class construction based on the output from url.parse"/>
<testcase name="will cause extra properties" time="0" classname="node v0.10.23.Host class construction based on the output from url.parse"/>
</testsuite>
<testsuite package="elasticsearch-js" id="86" name="Host class #makeUrl" timestamp="2013-12-12T23:04:56.374Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.002">
<testcase name="merges parameters" time="0" classname="node v0.10.23.Host class #makeUrl"/>
<testcase name="ensures that path starts with a forward-slash" time="0" classname="node v0.10.23.Host class #makeUrl"/>
<testcase name="does not try to prevent double forward-slashes" time="0" classname="node v0.10.23.Host class #makeUrl"/>
<testcase name="creates proper url without any params" time="0.001" classname="node v0.10.23.Host class #makeUrl"/>
</testsuite>
<testsuite package="elasticsearch-js" id="87" name="Host class #toString" timestamp="2013-12-12T23:04:56.376Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="produces the same output as makeUrl when it is called without params" time="0" classname="node v0.10.23.Host class #toString"/>
</testsuite>
<testsuite package="elasticsearch-js" id="88" name="Http Connector" timestamp="2013-12-12T23:04:56.376Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.11"/>
<testsuite package="elasticsearch-js" id="89" name="Http Connector Constructor" timestamp="2013-12-12T23:04:56.376Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.002">
<testcase name="creates an object that extends ConnectionAbstract" time="0" classname="node v0.10.23.Http Connector Constructor"/>
<testcase name="sets certain defaults" time="0" classname="node v0.10.23.Http Connector Constructor"/>
<testcase name="expects one the host to have a protocol of http or https" time="0" classname="node v0.10.23.Http Connector Constructor"/>
</testsuite>
<testsuite package="elasticsearch-js" id="90" name="Http Connector #makeReqParams" timestamp="2013-12-12T23:04:56.378Z" hostname="localhost" tests="5" failures="0" errors="0" time="0.003">
<testcase name="properly reads the host object" time="0" classname="node v0.10.23.Http Connector #makeReqParams"/>
<testcase name="merges a query object with the hosts&apos;" time="0.001" classname="node v0.10.23.Http Connector #makeReqParams"/>
<testcase name="merges the path prefex" time="0" classname="node v0.10.23.Http Connector #makeReqParams"/>
<testcase name="merges the query" time="0.001" classname="node v0.10.23.Http Connector #makeReqParams"/>
<testcase name="Works well with minimum params" time="0.001" classname="node v0.10.23.Http Connector #makeReqParams"/>
</testsuite>
<testsuite package="elasticsearch-js" id="91" name="Http Connector #request" timestamp="2013-12-12T23:04:56.381Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.005">
<testcase name="calls http based on the host" time="0.001" classname="node v0.10.23.Http Connector #request"/>
<testcase name="calls https based on the host" time="0" classname="node v0.10.23.Http Connector #request"/>
<testcase name="logs error events when an error occurs" time="0.001" classname="node v0.10.23.Http Connector #request"/>
<testcase name="logs error events" time="0.001" classname="node v0.10.23.Http Connector #request"/>
</testsuite>
<testsuite package="elasticsearch-js" id="92" name="Http Connector #request with incomming message error" timestamp="2013-12-12T23:04:56.386Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.089">
<testcase name="logs error event" time="0.021" classname="node v0.10.23.Http Connector #request with incomming message error"/>
<testcase name="passes the original error on" time="0.021" classname="node v0.10.23.Http Connector #request with incomming message error"/>
<testcase name="does not pass the partial body along" time="0.022" classname="node v0.10.23.Http Connector #request with incomming message error"/>
<testcase name="does not pass the status code along" time="0.022" classname="node v0.10.23.Http Connector #request with incomming message error"/>
</testsuite>
<testsuite package="elasticsearch-js" id="93" name="Http Connector #request&apos;s responder" timestamp="2013-12-12T23:04:56.475Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.007">
<testcase name="collects the whole request body" time="0.004" classname="node v0.10.23.Http Connector #request&apos;s responder"/>
<testcase name="Ignores serialization errors" time="0.001" classname="node v0.10.23.Http Connector #request&apos;s responder"/>
</testsuite>
<testsuite package="elasticsearch-js" id="94" name="Http Connector HTTP specifics" timestamp="2013-12-12T23:04:56.482Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.004">
<testcase name="uses TCP no delay" time="0.001" classname="node v0.10.23.Http Connector HTTP specifics"/>
<testcase name="sets the Content-Length header properly" time="0.002" classname="node v0.10.23.Http Connector HTTP specifics"/>
</testsuite>
<testsuite package="elasticsearch-js" id="95" name="JSON serializer" timestamp="2013-12-12T23:04:56.486Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.005"/>
<testsuite package="elasticsearch-js" id="96" name="JSON serializer #serialize" timestamp="2013-12-12T23:04:56.486Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.002">
<testcase name="defers to JSON.stringify" time="0" classname="node v0.10.23.JSON serializer #serialize"/>
<testcase name="does not modify strings" time="0" classname="node v0.10.23.JSON serializer #serialize"/>
<testcase name="returns nothing for invalid values" time="0" classname="node v0.10.23.JSON serializer #serialize"/>
<testcase name="throws serialization errors" time="0" classname="node v0.10.23.JSON serializer #serialize"/>
</testsuite>
<testsuite package="elasticsearch-js" id="97" name="JSON serializer #deserialize" timestamp="2013-12-12T23:04:56.488Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.002">
<testcase name="defers to JSON.parse" time="0" classname="node v0.10.23.JSON serializer #deserialize"/>
<testcase name="ignores non string values" time="0" classname="node v0.10.23.JSON serializer #deserialize"/>
<testcase name="catches serialization errors, returns nothing" time="0" classname="node v0.10.23.JSON serializer #deserialize"/>
</testsuite>
<testsuite package="elasticsearch-js" id="98" name="JSON serializer #bulkBody" timestamp="2013-12-12T23:04:56.490Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.001">
<testcase name="creates a string out of an array of obejcts" time="0" classname="node v0.10.23.JSON serializer #bulkBody"/>
<testcase name="adds a newline to the end of strings" time="0" classname="node v0.10.23.JSON serializer #bulkBody"/>
<testcase name="throws an error for anything else" time="0" classname="node v0.10.23.JSON serializer #bulkBody"/>
</testsuite>
<testsuite package="elasticsearch-js" id="99" name="Log class" timestamp="2013-12-12T23:04:56.491Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.019"/>
<testsuite package="elasticsearch-js" id="100" name="Log class ::parseLevels" timestamp="2013-12-12T23:04:56.491Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.002">
<testcase name="accepts a string and returns it and the other levels below it" time="0" classname="node v0.10.23.Log class ::parseLevels"/>
<testcase name="accepts and validates an array of levels" time="0" classname="node v0.10.23.Log class ::parseLevels"/>
<testcase name="throws an error when an invalid string is supplied" time="0" classname="node v0.10.23.Log class ::parseLevels"/>
<testcase name="throws an error when an invalid string is supplied in side an array" time="0" classname="node v0.10.23.Log class ::parseLevels"/>
</testsuite>
<testsuite package="elasticsearch-js" id="101" name="Log class #addOutput" timestamp="2013-12-12T23:04:56.493Z" hostname="localhost" tests="5" failures="0" errors="0" time="0.004">
<testcase name="returns the newly created logger" time="0" classname="node v0.10.23.Log class #addOutput"/>
<testcase name="Accepts a config object with `level: &quot;{{level}}&quot;`" time="0" classname="node v0.10.23.Log class #addOutput"/>
<testcase name="Accepts a config object with `level: [&quot;{{level}}&quot;]`" time="0" classname="node v0.10.23.Log class #addOutput"/>
<testcase name="Accepts a config object with `levels: &quot;{{level}}&quot;`" time="0" classname="node v0.10.23.Log class #addOutput"/>
<testcase name="Accepts a config object with `levels: [&quot;{{level}}&quot;]`" time="0" classname="node v0.10.23.Log class #addOutput"/>
</testsuite>
<testsuite package="elasticsearch-js" id="102" name="Log class #join" timestamp="2013-12-12T23:04:56.497Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.005">
<testcase name="joins strings together with spaces" time="0" classname="node v0.10.23.Log class #join"/>
<testcase name="stringifies objects" time="0.005" classname="node v0.10.23.Log class #join"/>
</testsuite>
<testsuite package="elasticsearch-js" id="103" name="Log class instance without any outputs" timestamp="2013-12-12T23:04:56.502Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="should not emit any events" time="0" classname="node v0.10.23.Log class instance without any outputs"/>
</testsuite>
<testsuite package="elasticsearch-js" id="104" name="Log class instance without one output listening to all events" timestamp="2013-12-12T23:04:56.503Z" hostname="localhost" tests="5" failures="0" errors="0" time="0.003">
<testcase name="should emit an &quot;error&quot; event with an Error object arg" time="0" classname="node v0.10.23.Log class instance without one output listening to all events"/>
<testcase name="should emit a &quot;warning&quot; event with a single message arg for #warning calls" time="0" classname="node v0.10.23.Log class instance without one output listening to all events"/>
<testcase name="should emit a &quot;info&quot; event with a single message arg for #info calls" time="0" classname="node v0.10.23.Log class instance without one output listening to all events"/>
<testcase name="should emit a &quot;debug&quot; event with a single message arg for #debug calls" time="0" classname="node v0.10.23.Log class instance without one output listening to all events"/>
<testcase name="should emit a trace event for trace events, with message and curlCall args" time="0" classname="node v0.10.23.Log class instance without one output listening to all events"/>
</testsuite>
<testsuite package="elasticsearch-js" id="105" name="Log class constructor" timestamp="2013-12-12T23:04:56.506Z" hostname="localhost" tests="5" failures="0" errors="0" time="0.004">
<testcase name="looks for output config options at config.log" time="0" classname="node v0.10.23.Log class constructor"/>
<testcase name="accepts a string and treat it as a log level" time="0" classname="node v0.10.23.Log class constructor"/>
<testcase name="accepts an array of strings and treat it as a log level config" time="0" classname="node v0.10.23.Log class constructor"/>
<testcase name="accepts an array of output config objects" time="0.001" classname="node v0.10.23.Log class constructor"/>
<testcase name="rejects numbers and other truthy data-types" time="0" classname="node v0.10.23.Log class constructor"/>
</testsuite>
<testsuite package="elasticsearch-js" id="106" name="Nodes to host callback" timestamp="2013-12-12T23:04:56.510Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="properly creates host objects" time="0" classname="node v0.10.23.Nodes to host callback"/>
</testsuite>
<testsuite package="elasticsearch-js" id="107" name="Random Selector" timestamp="2013-12-12T23:04:56.510Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="chooses a selection by random" time="0" classname="node v0.10.23.Random Selector"/>
</testsuite>
<testsuite package="elasticsearch-js" id="108" name="Round Robin Selector" timestamp="2013-12-12T23:04:56.511Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="chooses options in order" time="0" classname="node v0.10.23.Round Robin Selector"/>
</testsuite>
<testsuite package="elasticsearch-js" id="109" name="Stdio Logger" timestamp="2013-12-12T23:04:56.512Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.024"/>
<testsuite package="elasticsearch-js" id="110" name="Stdio Logger Constuctor" timestamp="2013-12-12T23:04:56.512Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="calls setupListeners, passes its new levels" time="0.001" classname="node v0.10.23.Stdio Logger Constuctor"/>
<testcase name="listens for the loggers&apos; &quot;closing&quot; event" time="0.001" classname="node v0.10.23.Stdio Logger Constuctor"/>
</testsuite>
<testsuite package="elasticsearch-js" id="111" name="Stdio Logger listening levels" timestamp="2013-12-12T23:04:56.515Z" hostname="localhost" tests="7" failures="0" errors="0" time="0.005">
<testcase name="calls cleanUpListeners when the listeners are being setup" time="0" classname="node v0.10.23.Stdio Logger listening levels"/>
<testcase name="listens to just error when log is explicitly error" time="0" classname="node v0.10.23.Stdio Logger listening levels"/>
<testcase name="listens for all the events when level is &quot;trace&quot;" time="0.001" classname="node v0.10.23.Stdio Logger listening levels"/>
<testcase name="listens for specific events when level is an array" time="0" classname="node v0.10.23.Stdio Logger listening levels"/>
<testcase name="sets the logLevel property to the new levels" time="0" classname="node v0.10.23.Stdio Logger listening levels"/>
<testcase name="rejects listening levels it can not listen to" time="0.001" classname="node v0.10.23.Stdio Logger listening levels"/>
<testcase name="emits events because something is listening" time="0.001" classname="node v0.10.23.Stdio Logger listening levels"/>
</testsuite>
<testsuite package="elasticsearch-js" id="112" name="Stdio Logger #timestamp" timestamp="2013-12-12T23:04:56.520Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="returns in the right format" time="0" classname="node v0.10.23.Stdio Logger #timestamp"/>
</testsuite>
<testsuite package="elasticsearch-js" id="113" name="Stdio Logger #format" timestamp="2013-12-12T23:04:56.521Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="returns a single string with the message indented" time="0" classname="node v0.10.23.Stdio Logger #format"/>
<testcase name="properly indents multi-line messages" time="0" classname="node v0.10.23.Stdio Logger #format"/>
</testsuite>
<testsuite package="elasticsearch-js" id="114" name="Stdio Logger #onError" timestamp="2013-12-12T23:04:56.522Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="uses the Error name when it is not just &quot;Error&quot;" time="0" classname="node v0.10.23.Stdio Logger #onError"/>
<testcase name="uses &quot;ERROR&quot; when the error name is &quot;Error&quot;" time="0.001" classname="node v0.10.23.Stdio Logger #onError"/>
</testsuite>
<testsuite package="elasticsearch-js" id="115" name="Stdio Logger #onWarning" timestamp="2013-12-12T23:04:56.525Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;WARNING&quot; label" time="0.001" classname="node v0.10.23.Stdio Logger #onWarning"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Stdio Logger #onWarning"/>
</testsuite>
<testsuite package="elasticsearch-js" id="116" name="Stdio Logger #onInfo" timestamp="2013-12-12T23:04:56.527Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;INFO&quot; label" time="0.001" classname="node v0.10.23.Stdio Logger #onInfo"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Stdio Logger #onInfo"/>
</testsuite>
<testsuite package="elasticsearch-js" id="117" name="Stdio Logger #onDebug" timestamp="2013-12-12T23:04:56.529Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;DEBUG&quot; label" time="0" classname="node v0.10.23.Stdio Logger #onDebug"/>
<testcase name="echos the message" time="0.001" classname="node v0.10.23.Stdio Logger #onDebug"/>
</testsuite>
<testsuite package="elasticsearch-js" id="118" name="Stdio Logger #onTrace" timestamp="2013-12-12T23:04:56.531Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the &quot;TRACE&quot; label" time="0" classname="node v0.10.23.Stdio Logger #onTrace"/>
<testcase name="joins the message and curl call with a newline" time="0" classname="node v0.10.23.Stdio Logger #onTrace"/>
</testsuite>
<testsuite package="elasticsearch-js" id="119" name="Stdio Logger colorizing" timestamp="2013-12-12T23:04:56.532Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.004">
<testcase name="uses colors when it&apos;s supported" time="0" classname="node v0.10.23.Stdio Logger colorizing"/>
<testcase name="obeys the logger.color === false" time="0" classname="node v0.10.23.Stdio Logger colorizing"/>
<testcase name="obeys the logger.color === true" time="0" classname="node v0.10.23.Stdio Logger colorizing"/>
</testsuite>
<testsuite package="elasticsearch-js" id="120" name="Stream Logger" timestamp="2013-12-12T23:04:56.536Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.027"/>
<testsuite package="elasticsearch-js" id="121" name="Stream Logger buffer flushing" timestamp="2013-12-12T23:04:56.536Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="writes everything in the buffer to console.error" time="0.001" classname="node v0.10.23.Stream Logger buffer flushing"/>
</testsuite>
<testsuite package="elasticsearch-js" id="122" name="Stream Logger Constuctor" timestamp="2013-12-12T23:04:56.537Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="calls setupListeners, passes its new levels" time="0" classname="node v0.10.23.Stream Logger Constuctor"/>
<testcase name="listens for the loggers&apos; &quot;closing&quot; event" time="0" classname="node v0.10.23.Stream Logger Constuctor"/>
</testsuite>
<testsuite package="elasticsearch-js" id="123" name="Stream Logger listening levels" timestamp="2013-12-12T23:04:56.539Z" hostname="localhost" tests="7" failures="0" errors="0" time="0.006">
<testcase name="calls cleanUpListeners when the listeners are being setup" time="0.001" classname="node v0.10.23.Stream Logger listening levels"/>
<testcase name="listens to just error when log is explicitly error" time="0" classname="node v0.10.23.Stream Logger listening levels"/>
<testcase name="listens for all the events when level is &quot;trace&quot;" time="0" classname="node v0.10.23.Stream Logger listening levels"/>
<testcase name="listens for specific events when level is an array" time="0" classname="node v0.10.23.Stream Logger listening levels"/>
<testcase name="sets the logLevel property to the new levels" time="0.001" classname="node v0.10.23.Stream Logger listening levels"/>
<testcase name="rejects listening levels it can not listen to" time="0.001" classname="node v0.10.23.Stream Logger listening levels"/>
<testcase name="emits events because something is listening" time="0" classname="node v0.10.23.Stream Logger listening levels"/>
</testsuite>
<testsuite package="elasticsearch-js" id="124" name="Stream Logger #timestamp" timestamp="2013-12-12T23:04:56.545Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="returns in the right format" time="0" classname="node v0.10.23.Stream Logger #timestamp"/>
</testsuite>
<testsuite package="elasticsearch-js" id="125" name="Stream Logger #format" timestamp="2013-12-12T23:04:56.546Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="returns a single string with the message indented" time="0" classname="node v0.10.23.Stream Logger #format"/>
<testcase name="properly indents multi-line messages" time="0" classname="node v0.10.23.Stream Logger #format"/>
</testsuite>
<testsuite package="elasticsearch-js" id="126" name="Stream Logger #onError" timestamp="2013-12-12T23:04:56.547Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the Error name when it is not just &quot;Error&quot;" time="0.001" classname="node v0.10.23.Stream Logger #onError"/>
<testcase name="uses &quot;ERROR&quot; when the error name is &quot;Error&quot;" time="0.001" classname="node v0.10.23.Stream Logger #onError"/>
</testsuite>
<testsuite package="elasticsearch-js" id="127" name="Stream Logger #onWarning" timestamp="2013-12-12T23:04:56.549Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.006">
<testcase name="uses the &quot;WARNING&quot; label" time="0.001" classname="node v0.10.23.Stream Logger #onWarning"/>
<testcase name="echos the message" time="0.001" classname="node v0.10.23.Stream Logger #onWarning"/>
</testsuite>
<testsuite package="elasticsearch-js" id="128" name="Stream Logger #onInfo" timestamp="2013-12-12T23:04:56.555Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="uses the &quot;INFO&quot; label" time="0" classname="node v0.10.23.Stream Logger #onInfo"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Stream Logger #onInfo"/>
</testsuite>
<testsuite package="elasticsearch-js" id="129" name="Stream Logger #onDebug" timestamp="2013-12-12T23:04:56.558Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;DEBUG&quot; label" time="0.001" classname="node v0.10.23.Stream Logger #onDebug"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Stream Logger #onDebug"/>
</testsuite>
<testsuite package="elasticsearch-js" id="130" name="Stream Logger #onTrace" timestamp="2013-12-12T23:04:56.561Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;TRACE&quot; label" time="0.001" classname="node v0.10.23.Stream Logger #onTrace"/>
<testcase name="joins the message and curl call with a newline" time="0" classname="node v0.10.23.Stream Logger #onTrace"/>
</testsuite>
<testsuite package="elasticsearch-js" id="131" name="Tracer Logger" timestamp="2013-12-12T23:04:56.563Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.024"/>
<testsuite package="elasticsearch-js" id="132" name="Tracer Logger Constuctor" timestamp="2013-12-12T23:04:56.563Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="calls setupListeners, passes its new levels" time="0" classname="node v0.10.23.Tracer Logger Constuctor"/>
<testcase name="listens for the loggers&apos; &quot;closing&quot; event" time="0" classname="node v0.10.23.Tracer Logger Constuctor"/>
</testsuite>
<testsuite package="elasticsearch-js" id="133" name="Tracer Logger listening levels" timestamp="2013-12-12T23:04:56.566Z" hostname="localhost" tests="7" failures="0" errors="0" time="0.006">
<testcase name="calls cleanUpListeners when the listeners are being setup" time="0" classname="node v0.10.23.Tracer Logger listening levels"/>
<testcase name="listens to just error when log is explicitly error" time="0" classname="node v0.10.23.Tracer Logger listening levels"/>
<testcase name="listens for all the events when level is &quot;trace&quot;" time="0" classname="node v0.10.23.Tracer Logger listening levels"/>
<testcase name="listens for specific events when level is an array" time="0" classname="node v0.10.23.Tracer Logger listening levels"/>
<testcase name="sets the logLevel property to the new levels" time="0" classname="node v0.10.23.Tracer Logger listening levels"/>
<testcase name="rejects listening levels it can not listen to" time="0" classname="node v0.10.23.Tracer Logger listening levels"/>
<testcase name="emits events because something is listening" time="0.001" classname="node v0.10.23.Tracer Logger listening levels"/>
</testsuite>
<testsuite package="elasticsearch-js" id="134" name="Tracer Logger #timestamp" timestamp="2013-12-12T23:04:56.572Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="returns in the right format" time="0" classname="node v0.10.23.Tracer Logger #timestamp"/>
</testsuite>
<testsuite package="elasticsearch-js" id="135" name="Tracer Logger #format" timestamp="2013-12-12T23:04:56.573Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="returns a single string with the message indented" time="0" classname="node v0.10.23.Tracer Logger #format"/>
<testcase name="properly indents multi-line messages" time="0" classname="node v0.10.23.Tracer Logger #format"/>
</testsuite>
<testsuite package="elasticsearch-js" id="136" name="Tracer Logger #onError" timestamp="2013-12-12T23:04:56.576Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="uses the Error name when it is not just &quot;Error&quot;" time="0.001" classname="node v0.10.23.Tracer Logger #onError"/>
<testcase name="uses &quot;ERROR&quot; when the error name is &quot;Error&quot;" time="0.001" classname="node v0.10.23.Tracer Logger #onError"/>
</testsuite>
<testsuite package="elasticsearch-js" id="137" name="Tracer Logger #onWarning" timestamp="2013-12-12T23:04:56.579Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="uses the &quot;WARNING&quot; label" time="0" classname="node v0.10.23.Tracer Logger #onWarning"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Tracer Logger #onWarning"/>
</testsuite>
<testsuite package="elasticsearch-js" id="138" name="Tracer Logger #onInfo" timestamp="2013-12-12T23:04:56.580Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;INFO&quot; label" time="0" classname="node v0.10.23.Tracer Logger #onInfo"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Tracer Logger #onInfo"/>
</testsuite>
<testsuite package="elasticsearch-js" id="139" name="Tracer Logger #onDebug" timestamp="2013-12-12T23:04:56.582Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;DEBUG&quot; label" time="0" classname="node v0.10.23.Tracer Logger #onDebug"/>
<testcase name="echos the message" time="0" classname="node v0.10.23.Tracer Logger #onDebug"/>
</testsuite>
<testsuite package="elasticsearch-js" id="140" name="Tracer Logger #onTrace" timestamp="2013-12-12T23:04:56.584Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="uses the &quot;TRACE&quot; label" time="0" classname="node v0.10.23.Tracer Logger #onTrace"/>
<testcase name="joins the message and curl call with a newline" time="0" classname="node v0.10.23.Tracer Logger #onTrace"/>
</testsuite>
<testsuite package="elasticsearch-js" id="141" name="Tracer Logger #write" timestamp="2013-12-12T23:04:56.586Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="comments out everything accept the curlCall" time="0.001" classname="node v0.10.23.Tracer Logger #write"/>
</testsuite>
<testsuite package="elasticsearch-js" id="142" name="Transport Class" timestamp="2013-12-12T23:04:56.588Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.104"/>
<testsuite package="elasticsearch-js" id="143" name="Transport Class Constructor" timestamp="2013-12-12T23:04:56.588Z" hostname="localhost" tests="5" failures="0" errors="0" time="0.013">
<testcase name="Accepts a log class and intanciates it at this.log" time="0" classname="node v0.10.23.Transport Class Constructor"/>
<testcase name="Accepts a &quot;createDefer&quot; function, which can be used to tie into other promise libs." time="0" classname="node v0.10.23.Transport Class Constructor"/>
<testcase name="Accepts a connection pool class and intanciates it at this.connectionPool" time="0" classname="node v0.10.23.Transport Class Constructor"/>
<testcase name="Accepts the name of a connectionPool class that is defined on Transport.connectionPools" time="0" classname="node v0.10.23.Transport Class Constructor"/>
<testcase name="Throws an error when connectionPool config is set wrong" time="0" classname="node v0.10.23.Transport Class Constructor"/>
</testsuite>
<testsuite package="elasticsearch-js" id="144" name="Transport Class Constructor host config" timestamp="2013-12-12T23:04:56.592Z" hostname="localhost" tests="6" failures="0" errors="0" time="0.007">
<testcase name="rejects non-strings/objects" time="0" classname="node v0.10.23.Transport Class Constructor host config"/>
<testcase name="accepts the config value on the host: key" time="0.001" classname="node v0.10.23.Transport Class Constructor host config"/>
<testcase name="accepts the config value on the hosts: key" time="0" classname="node v0.10.23.Transport Class Constructor host config"/>
<testcase name="accepts A host object as the config" time="0" classname="node v0.10.23.Transport Class Constructor host config"/>
<testcase name="accepts strings as the config" time="0" classname="node v0.10.23.Transport Class Constructor host config"/>
<testcase name="accepts objects as the config" time="0" classname="node v0.10.23.Transport Class Constructor host config"/>
</testsuite>
<testsuite package="elasticsearch-js" id="145" name="Transport Class Constructor randomizeHosts options" timestamp="2013-12-12T23:04:56.599Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.002">
<testcase name="calls _.shuffle be default" time="0.001" classname="node v0.10.23.Transport Class Constructor randomizeHosts options"/>
<testcase name="skips the call to _.shuffle when false" time="0.001" classname="node v0.10.23.Transport Class Constructor randomizeHosts options"/>
</testsuite>
<testsuite package="elasticsearch-js" id="146" name="Transport Class #sniff" timestamp="2013-12-12T23:04:56.601Z" hostname="localhost" tests="6" failures="0" errors="0" time="0.013">
<testcase name="works without a callback" time="0.006" classname="node v0.10.23.Transport Class #sniff"/>
<testcase name="calls the nodesToHostCallback with the list of nodes" time="0" classname="node v0.10.23.Transport Class #sniff"/>
<testcase name="takes the host configs, converts them into Host objects, and passes them to connectionPool.setHosts" time="0.001" classname="node v0.10.23.Transport Class #sniff"/>
<testcase name="passed back errors caught from the request" time="0" classname="node v0.10.23.Transport Class #sniff"/>
<testcase name="passed back the full server response" time="0" classname="node v0.10.23.Transport Class #sniff"/>
<testcase name="passed back the server response code" time="0" classname="node v0.10.23.Transport Class #sniff"/>
</testsuite>
<testsuite package="elasticsearch-js" id="147" name="Transport Class #createDefer" timestamp="2013-12-12T23:04:56.614Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="returns a when.js promise by default" time="0.001" classname="node v0.10.23.Transport Class #createDefer"/>
<testcase name="is overridden by the createDefer option" time="0" classname="node v0.10.23.Transport Class #createDefer"/>
</testsuite>
<testsuite package="elasticsearch-js" id="148" name="Transport Class #request" timestamp="2013-12-12T23:04:56.617Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.074">
<testcase name="logs when it begins" time="0.001" classname="node v0.10.23.Transport Class #request"/>
<testcase name="rejects get requests with bodies" time="0" classname="node v0.10.23.Transport Class #request"/>
</testsuite>
<testsuite package="elasticsearch-js" id="149" name="Transport Class #request gets a body" timestamp="2013-12-12T23:04:56.620Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.003">
<testcase name="serializes it" time="0.001" classname="node v0.10.23.Transport Class #request gets a body"/>
<testcase name="serializes bulk bodies" time="0.001" classname="node v0.10.23.Transport Class #request gets a body"/>
</testsuite>
<testsuite package="elasticsearch-js" id="150" name="Transport Class #request gets a body it cant serialize" timestamp="2013-12-12T23:04:56.623Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="throws an error" time="0" classname="node v0.10.23.Transport Class #request gets a body it cant serialize"/>
</testsuite>
<testsuite package="elasticsearch-js" id="151" name="Transport Class #request when selecting a connection" timestamp="2013-12-12T23:04:56.624Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.004">
<testcase name="logs a warning, and responds with NoConnection when it receives nothing" time="0.001" classname="node v0.10.23.Transport Class #request when selecting a connection"/>
<testcase name="quits if a sync selector throws an error" time="0.001" classname="node v0.10.23.Transport Class #request when selecting a connection"/>
<testcase name="quits if gets an error from an async selector" time="0.001" classname="node v0.10.23.Transport Class #request when selecting a connection"/>
<testcase name="calls connection#request once it gets one" time="0.001" classname="node v0.10.23.Transport Class #request when selecting a connection"/>
</testsuite>
<testsuite package="elasticsearch-js" id="152" name="Transport Class #request gets a connection err" timestamp="2013-12-12T23:04:56.628Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.016">
<testcase name="retries when there are retries remaining" time="0.014" classname="node v0.10.23.Transport Class #request gets a connection err"/>
<testcase name="responds when there are no retries" time="0.001" classname="node v0.10.23.Transport Class #request gets a connection err"/>
</testsuite>
<testsuite package="elasticsearch-js" id="153" name="Transport Class #request server responds" timestamp="2013-12-12T23:04:56.644Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.01"/>
<testsuite package="elasticsearch-js" id="154" name="Transport Class #request server responds with a 400 status code" timestamp="2013-12-12T23:04:56.644Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.003">
<testcase name="passes back a 400/BadRequest error" time="0.002" classname="node v0.10.23.Transport Class #request server responds with a 400 status code"/>
</testsuite>
<testsuite package="elasticsearch-js" id="155" name="Transport Class #request server responds with a 404 status code" timestamp="2013-12-12T23:04:56.647Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.002"/>
<testsuite package="elasticsearch-js" id="156" name="Transport Class #request server responds with a 404 status code and castExists is set" timestamp="2013-12-12T23:04:56.647Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="sends back false" time="0" classname="node v0.10.23.Transport Class #request server responds with a 404 status code and castExists is set"/>
</testsuite>
<testsuite package="elasticsearch-js" id="157" name="Transport Class #request server responds with a 404 status code and the castExists param is not set" timestamp="2013-12-12T23:04:56.648Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="sends back a 404/NotFound error" time="0" classname="node v0.10.23.Transport Class #request server responds with a 404 status code and the castExists param is not set"/>
</testsuite>
<testsuite package="elasticsearch-js" id="158" name="Transport Class #request server responds with a 500 status code" timestamp="2013-12-12T23:04:56.649Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="passes back a 500/InternalServerError error" time="0" classname="node v0.10.23.Transport Class #request server responds with a 500 status code"/>
</testsuite>
<testsuite package="elasticsearch-js" id="159" name="Transport Class #request server responds with a 500 status code" timestamp="2013-12-12T23:04:56.650Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="passes back a Generic error" time="0.001" classname="node v0.10.23.Transport Class #request server responds with a 500 status code"/>
</testsuite>
<testsuite package="elasticsearch-js" id="160" name="Transport Class #request server responds with a 200 status code" timestamp="2013-12-12T23:04:56.651Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.003"/>
<testsuite package="elasticsearch-js" id="161" name="Transport Class #request server responds with a 200 status code and the castExists param is set" timestamp="2013-12-12T23:04:56.651Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="sends back true" time="0.001" classname="node v0.10.23.Transport Class #request server responds with a 200 status code and the castExists param is set"/>
</testsuite>
<testsuite package="elasticsearch-js" id="162" name="Transport Class #request server responds with a 200 status code with a partial response body" timestamp="2013-12-12T23:04:56.652Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="sends back a serialization error" time="0.001" classname="node v0.10.23.Transport Class #request server responds with a 200 status code with a partial response body"/>
</testsuite>
<testsuite package="elasticsearch-js" id="163" name="Transport Class #request server responds with a 200 status code with a valid response body" timestamp="2013-12-12T23:04:56.653Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="sends back the body and status code with no error" time="0" classname="node v0.10.23.Transport Class #request server responds with a 200 status code with a valid response body"/>
</testsuite>
<testsuite package="elasticsearch-js" id="164" name="Transport Class #request return value" timestamp="2013-12-12T23:04:56.654Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.001">
<testcase name="returns an object with an abort() method when a callback is sent" time="0" classname="node v0.10.23.Transport Class #request return value"/>
<testcase name="the object is a promise when a callback is not suplied" time="0.001" classname="node v0.10.23.Transport Class #request return value"/>
<testcase name="the promise is always pulled from the defer created by this.createDefer()" time="0" classname="node v0.10.23.Transport Class #request return value"/>
</testsuite>
<testsuite package="elasticsearch-js" id="165" name="Transport Class #request aborting" timestamp="2013-12-12T23:04:56.655Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.004">
<testcase name="prevents the request from starting if called in the same tick" time="0" classname="node v0.10.23.Transport Class #request aborting"/>
<testcase name="calls the function returned by the connector if it has been called" time="0.001" classname="node v0.10.23.Transport Class #request aborting"/>
<testcase name="ignores the response from the connection when the connector does not support aborting" time="0.002" classname="node v0.10.23.Transport Class #request aborting"/>
</testsuite>
<testsuite package="elasticsearch-js" id="166" name="Transport Class #request timeout" timestamp="2013-12-12T23:04:56.659Z" hostname="localhost" tests="7" failures="0" errors="0" time="0.032">
<testcase name="uses 30 seconds for the default" time="0" classname="node v0.10.23.Transport Class #request timeout"/>
<testcase name="inherits the requestTimeout from the transport" time="0" classname="node v0.10.23.Transport Class #request timeout"/>
<testcase name="clears the timeout when the request is complete" time="0.001" classname="node v0.10.23.Transport Class #request timeout"/>
<testcase name="timeout responds with a requestTimeout error" time="0.026" classname="node v0.10.23.Transport Class #request timeout"/>
<testcase name="skips the timeout when it is false" time="0" classname="node v0.10.23.Transport Class #request timeout"/>
<testcase name="skips the timeout when it is 0" time="0" classname="node v0.10.23.Transport Class #request timeout"/>
<testcase name="skips the timeout when it is null" time="0" classname="node v0.10.23.Transport Class #request timeout"/>
</testsuite>
<testsuite package="elasticsearch-js" id="167" name="Transport Class #close" timestamp="2013-12-12T23:04:56.691Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="proxies the call to it&apos;s log and connection pool" time="0.001" classname="node v0.10.23.Transport Class #close"/>
</testsuite>
<testsuite package="elasticsearch-js" id="168" name="Utils" timestamp="2013-12-12T23:04:56.692Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.042"/>
<testsuite package="elasticsearch-js" id="169" name="Utils Additional Type Checkers" timestamp="2013-12-12T23:04:56.693Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.015"/>
<testsuite package="elasticsearch-js" id="170" name="Utils Additional Type Checkers #isArrayOfObject" timestamp="2013-12-12T23:04:56.693Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="likes arrays of Object" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfObject"/>
<testcase name="dislikes when there is even one non Object" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfObject"/>
</testsuite>
<testsuite package="elasticsearch-js" id="171" name="Utils Additional Type Checkers #isArrayOfPlainObject" timestamp="2013-12-12T23:04:56.694Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="likes arrays of PlainObject" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfPlainObject"/>
<testcase name="dislikes when there is even one non PlainObject" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfPlainObject"/>
</testsuite>
<testsuite package="elasticsearch-js" id="172" name="Utils Additional Type Checkers #isArrayOfString" timestamp="2013-12-12T23:04:56.695Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="likes arrays of String" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfString"/>
<testcase name="dislikes when there is even one non String" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfString"/>
</testsuite>
<testsuite package="elasticsearch-js" id="173" name="Utils Additional Type Checkers #isArrayOfArray" timestamp="2013-12-12T23:04:56.696Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="likes arrays of Array" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfArray"/>
<testcase name="dislikes when there is even one non Array" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfArray"/>
</testsuite>
<testsuite package="elasticsearch-js" id="174" name="Utils Additional Type Checkers #isArrayOfFinite" timestamp="2013-12-12T23:04:56.697Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="likes arrays of Finite" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfFinite"/>
<testcase name="dislikes when there is even one non Finite" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfFinite"/>
</testsuite>
<testsuite package="elasticsearch-js" id="175" name="Utils Additional Type Checkers #isArrayOfFunction" timestamp="2013-12-12T23:04:56.698Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="likes arrays of Function" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfFunction"/>
<testcase name="dislikes when there is even one non Function" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfFunction"/>
</testsuite>
<testsuite package="elasticsearch-js" id="176" name="Utils Additional Type Checkers #isArrayOfRegExp" timestamp="2013-12-12T23:04:56.699Z" hostname="localhost" tests="2" failures="0" errors="0" time="0.001">
<testcase name="likes arrays of RegExp" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfRegExp"/>
<testcase name="dislikes when there is even one non RegExp" time="0.001" classname="node v0.10.23.Utils Additional Type Checkers #isArrayOfRegExp"/>
</testsuite>
<testsuite package="elasticsearch-js" id="177" name="Utils Additional Type Checkers #isNumeric" timestamp="2013-12-12T23:04:56.700Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.002">
<testcase name="likes integer literals" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isNumeric"/>
<testcase name="likes float literals" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isNumeric"/>
<testcase name="dislikes non-numeric stuff" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isNumeric"/>
</testsuite>
<testsuite package="elasticsearch-js" id="178" name="Utils Additional Type Checkers #isInterval" timestamp="2013-12-12T23:04:56.702Z" hostname="localhost" tests="16" failures="0" errors="0" time="0.006">
<testcase name="likes months" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes decimal months" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes weeks" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes decimal weeks" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes days" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes decimal days" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes hours" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes decimal hours" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes minutes" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes decimal minutes" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes seconds" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes decimal seconds" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes years" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="likes decimal years" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="dislikes more than one unit" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
<testcase name="dislikes spaces" time="0" classname="node v0.10.23.Utils Additional Type Checkers #isInterval"/>
</testsuite>
<testsuite package="elasticsearch-js" id="179" name="Utils String Transformers" timestamp="2013-12-12T23:04:56.708Z" hostname="localhost" tests="0" failures="0" errors="0" time="0.008"/>
<testsuite package="elasticsearch-js" id="180" name="Utils String Transformers #camelCase" timestamp="2013-12-12T23:04:56.708Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.002">
<testcase name="find spaces, underscores, and other natural word breaks" time="0" classname="node v0.10.23.Utils String Transformers #camelCase"/>
<testcase name="ignores abreviations" time="0" classname="node v0.10.23.Utils String Transformers #camelCase"/>
<testcase name="handles leading _" time="0" classname="node v0.10.23.Utils String Transformers #camelCase"/>
</testsuite>
<testsuite package="elasticsearch-js" id="181" name="Utils String Transformers #studlyCase" timestamp="2013-12-12T23:04:56.710Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.002">
<testcase name="find spaces, underscores, and other natural word breaks" time="0" classname="node v0.10.23.Utils String Transformers #studlyCase"/>
<testcase name="ignores abreviations" time="0" classname="node v0.10.23.Utils String Transformers #studlyCase"/>
<testcase name="handles leading _" time="0" classname="node v0.10.23.Utils String Transformers #studlyCase"/>
</testsuite>
<testsuite package="elasticsearch-js" id="182" name="Utils String Transformers #snakeCase" timestamp="2013-12-12T23:04:56.712Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.001">
<testcase name="find spaces, underscores, and other natural word breaks" time="0" classname="node v0.10.23.Utils String Transformers #snakeCase"/>
<testcase name="ignores abreviations" time="0" classname="node v0.10.23.Utils String Transformers #snakeCase"/>
<testcase name="handles leading _" time="0" classname="node v0.10.23.Utils String Transformers #snakeCase"/>
</testsuite>
<testsuite package="elasticsearch-js" id="183" name="Utils String Transformers #toLowerString" timestamp="2013-12-12T23:04:56.713Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.001">
<testcase name="transforms normal strings" time="0" classname="node v0.10.23.Utils String Transformers #toLowerString"/>
<testcase name="ignores long form empty vals (null, false, undef)" time="0" classname="node v0.10.23.Utils String Transformers #toLowerString"/>
<testcase name="uses the objects own toString" time="0" classname="node v0.10.23.Utils String Transformers #toLowerString"/>
<testcase name="sorta kinda works on objects" time="0" classname="node v0.10.23.Utils String Transformers #toLowerString"/>
</testsuite>
<testsuite package="elasticsearch-js" id="184" name="Utils String Transformers #toUpperString" timestamp="2013-12-12T23:04:56.714Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.001">
<testcase name="transforms normal strings" time="0" classname="node v0.10.23.Utils String Transformers #toUpperString"/>
<testcase name="ignores long form empty vals (null, false, undef)" time="0" classname="node v0.10.23.Utils String Transformers #toUpperString"/>
<testcase name="uses the objects own toString" time="0" classname="node v0.10.23.Utils String Transformers #toUpperString"/>
<testcase name="sorta kinda works on objects" time="0" classname="node v0.10.23.Utils String Transformers #toUpperString"/>
</testsuite>
<testsuite package="elasticsearch-js" id="185" name="Utils String Transformers #repeat" timestamp="2013-12-12T23:04:56.715Z" hostname="localhost" tests="1" failures="0" errors="0" time="0.001">
<testcase name="repeats strings" time="0" classname="node v0.10.23.Utils String Transformers #repeat"/>
</testsuite>
<testsuite package="elasticsearch-js" id="186" name="Utils String Transformers #ucfirst" timestamp="2013-12-12T23:04:56.716Z" hostname="localhost" tests="1" failures="0" errors="0" time="0">
<testcase name="only capitalized the first letter, lowercases everything else" time="0" classname="node v0.10.23.Utils String Transformers #ucfirst"/>
</testsuite>
<testsuite package="elasticsearch-js" id="187" name="Utils #deepMerge" timestamp="2013-12-12T23:04:56.716Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.002">
<testcase name="returns the same object that was passed" time="0" classname="node v0.10.23.Utils #deepMerge"/>
<testcase name="concats arrays" time="0" classname="node v0.10.23.Utils #deepMerge"/>
<testcase name="wont merge values of different types" time="0" classname="node v0.10.23.Utils #deepMerge"/>
<testcase name="works recursively" time="0" classname="node v0.10.23.Utils #deepMerge"/>
</testsuite>
<testsuite package="elasticsearch-js" id="188" name="Utils #createArray" timestamp="2013-12-12T23:04:56.718Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.002">
<testcase name="accepts an array of things and simply returns a copy of it" time="0" classname="node v0.10.23.Utils #createArray"/>
<testcase name="accepts a primitive value and calls the the transform function" time="0" classname="node v0.10.23.Utils #createArray"/>
<testcase name="wraps any non-array in an array" time="0" classname="node v0.10.23.Utils #createArray"/>
<testcase name="returns false when the transform function returns undefined" time="0" classname="node v0.10.23.Utils #createArray"/>
</testsuite>
<testsuite package="elasticsearch-js" id="189" name="Utils #funcEnum" timestamp="2013-12-12T23:04:56.720Z" hostname="localhost" tests="4" failures="0" errors="0" time="0.002">
<testcase name="tests if the value at key in object is a function, returns it if so" time="0" classname="node v0.10.23.Utils #funcEnum"/>
<testcase name="tests if the value at key in object is undefined, returns the option at key default if so" time="0" classname="node v0.10.23.Utils #funcEnum"/>
<testcase name="tests if the value at key in object is a string, returns the option at that key if so" time="0" classname="node v0.10.23.Utils #funcEnum"/>
<testcase name="throws an informative error if the selection if invalid" time="0" classname="node v0.10.23.Utils #funcEnum"/>
</testsuite>
<testsuite package="elasticsearch-js" id="190" name="Utils #applyArgs" timestamp="2013-12-12T23:04:56.722Z" hostname="localhost" tests="20" failures="0" errors="0" time="0.011">
<testcase name="uses call with 0 args" time="0.001" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling call with 1 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="uses call with 1 args" time="0.001" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling call with 2 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="uses call with 2 args" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling call with 3 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="uses call with 3 args" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling call with 4 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="uses call with 4 args" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling call with 5 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="uses call with 5 args" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling call with 6 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="uses apply with 6 args" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling apply with 7 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="uses apply with 7 args" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling apply with 8 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="uses apply with 8 args" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling apply with 9 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="uses apply with 9 args" time="0" classname="node v0.10.23.Utils #applyArgs"/>
<testcase name="slices the arguments properly before calling apply with 10 args sliced at 1" time="0" classname="node v0.10.23.Utils #applyArgs"/>
</testsuite>
<testsuite package="elasticsearch-js" id="191" name="Utils #getUnwrittenFromStream" timestamp="2013-12-12T23:04:56.733Z" hostname="localhost" tests="3" failures="0" errors="0" time="0.001">
<testcase name="ignores things that do not have writableState" time="0" classname="node v0.10.23.Utils #getUnwrittenFromStream"/>
<testcase name="ignores empty stream" time="0" classname="node v0.10.23.Utils #getUnwrittenFromStream"/>
<testcase name="returns only what is in the buffer" time="0" classname="node v0.10.23.Utils #getUnwrittenFromStream"/>
</testsuite>
</testsuites>

View File

@ -10,6 +10,10 @@ var sinon = require('sinon');
var util = require('util');
var Readable = require('stream').Readable;
if (!Readable) {
Readable = require('events').EventEmitter;
}
function MockIncommingMessage() {
var self = this;

View File

@ -1,22 +0,0 @@
/**
* Just a buffer really, but one that implements just a few methods similar
* to the old writable streams, but without the same internals as streams 2.0
* Writables.
*
* @type {Constuctor}
*/
module.exports = MockOldWritableStream;
var util = require('util');
function MockOldWritableStream(opts) {
var queue = [];
this.write = function (chunk) {
queue.push(chunk);
};
this.end = function () {
queue.push(null);
};
}

View File

@ -2,15 +2,76 @@
* Just a buffer really, but one that implements the Writable class
* @type {Constuctor}
*/
module.exports = MockWritableStream;
var Writable = require('stream').Writable;
var util = require('util');
var MockWritableStream; // defined simply for 0.10+, in detail for older versions
var Writable = require('stream').Writable;
function MockWritableStream(opts) {
Writable.call(this, opts);
if (Writable) {
// nice and simple for streams 2
MockWritableStream = module.exports = function (opts) {
Writable.call(this, opts);
this._write = function (chunk, encoding, cb) {};
this._write = function (chunk, encoding, cb) {};
};
util.inherits(MockWritableStream, Writable);
return;
}
util.inherits(MockWritableStream, Writable);
// Node < 0.10 did not provide a usefull stream abstract
var Stream = require('stream').Stream;
module.exports = MockWritableStream = function (opts) {
Stream.call(this);
this.writable = true;
};
util.inherits(MockWritableStream, Stream);
MockWritableStream.prototype.write = function (data) {
if (!this.writable) {
this.emit('error', new Error('stream not writable'));
return false;
}
var cb;
if (typeof(arguments[arguments.length - 1]) === 'function') {
cb = arguments[arguments.length - 1];
}
if (cb) {
process.nextTick(cb);
}
};
MockWritableStream.prototype.end = function (data, encoding, cb) {
if (typeof(data) === 'function') {
cb = data;
} else if (typeof(encoding) === 'function') {
cb = encoding;
this.write(data);
} else if (arguments.length > 0) {
this.write(data, encoding);
}
this.writable = false;
};
MockWritableStream.prototype.destroy = function (cb) {
var self = this;
if (!this.writable) {
if (cb) {
process.nextTick(function () { cb(null); });
}
return;
}
this.writable = false;
process.nextTick(function () {
if (cb) {
cb(null);
}
self.emit('close');
});
};
// There is no shutdown() for files.
MockWritableStream.prototype.destroySoon = MockWritableStream.prototype.end;

View File

@ -0,0 +1,59 @@
module.exports = function (makeLogger) {
var stub = require('./auto_release_stub').make();
var fs = require('fs');
var once = require('events').EventEmitter.prototype.once;
var _ = require('lodash');
describe('buffer flush', function () {
if (require('stream').Writable) {
it('writes everything in the buffer to console.error', function () {
var line = 'This string is written 10 times to create buffered output\n';
var exitHandler;
stub(process, 'once', function (event, handler) {
if (event === 'exit') {
exitHandler = handler;
}
once.call(process, event, handler);
});
var logger = makeLogger();
// write the line 10 times
_.times(10, function () {
logger.onDebug(line);
});
// collect everything that is written to fs.appendFileSync
var flushedOutput = '';
stub(fs, 'appendFileSync', function (path, str) {
flushedOutput += str;
});
// call the event handler
exitHandler.call(process);
// the first line is sent immediately to _write and there is nothing we can do about that
flushedOutput.should.match(new RegExp(line));
flushedOutput.match(new RegExp(line, 'g')).length.should.eql(9);
});
} else {
it('does not fall apart with non streams2 streams', function () {
var exitHandler;
stub(process, 'once', function (event, handler) {
if (event === 'exit') {
exitHandler = handler;
}
once.call(process, event, handler);
});
var logger = makeLogger();
(function () {
// call the event handler
exitHandler.call(process);
}).should.not.throw();
});
}
});
};

View File

@ -1,11 +1,9 @@
var Log = require('../../src/lib/log');
var FileLogger = require('../../src/lib/loggers/file');
var sinon = require('sinon');
var once = require('events').EventEmitter.prototype.once;
var write = require('stream').Writable.prototype.write;
var MockWritableStream = require('../mocks/writable_stream');
var _ = require('lodash');
var parentLog;
var logger;
var fs = require('fs');
beforeEach(function () {
@ -14,58 +12,81 @@ beforeEach(function () {
afterEach(function () {
parentLog.close();
if (logger
&& logger.stream
&& logger.stream._writableState
&& logger.stream._writableState.buffer.length
) {
// empty the buffer manually
logger.stream._writableState.buffer.splice(0);
}
});
function makeLogger(parent, levels, path) {
function makeLogger(parent, levels) {
parent = parent || parentLog;
var config = {
logger = new FileLogger(parent, {
levels: Log.parseLevels(levels || 'trace'),
path: path === void 0 ? 'elasticsearch.log' : path
};
var logger = new FileLogger(parent, config);
logger.stream.end();
logger.stream = new MockWritableStream();
path: 'test.log'
});
return logger;
}
var stub = require('./auto_release_stub').make();
describe('File Logger', function () {
require('./generic_logger_tests')(makeLogger);
describe('buffer flush', function () {
it('writes everything in the buffer to console.error', function () {
var line = 'This string is writte 10 times to create buffered output.\n';
if (require('stream').Writable) {
it('writes everything in the buffer to console.error', function () {
var line = 'This string is written 10 times to create buffered output\n';
var exitHandler;
stub(process, 'once', function (event, handler) {
if (event === 'exit') {
exitHandler = handler;
}
once.call(process, event, handler);
var exitHandler;
stub(process, 'once', function (event, handler) {
if (event === 'exit') {
exitHandler = handler;
}
once.call(process, event, handler);
});
var logger = makeLogger();
// write the line 10 times
_.times(10, function () {
logger.onDebug(line);
});
// collect everything that is written to fs.appendFileSync
var flushedOutput = '';
stub(fs, 'appendFileSync', function (path, str) {
flushedOutput += str;
});
// call the event handler
exitHandler.call(process);
// the first line is sent immediately to _write and there is nothing we can do about that
flushedOutput.should.match(new RegExp(line));
flushedOutput.match(new RegExp(line, 'g')).length.should.eql(9);
});
} else {
it('does not fall apart with non streams2 streams', function () {
var exitHandler;
stub(process, 'once', function (event, handler) {
if (event === 'exit') {
exitHandler = handler;
}
once.call(process, event, handler);
});
var logger = makeLogger();
var logger = makeLogger();
// write the line 10 times
_.times(10, function () {
logger.onDebug(line);
(function () {
// call the event handler
exitHandler.call(process);
}).should.not.throw();
});
// collect everything that is written to fs.appendFileSync
var flushedOutput = '';
stub(fs, 'appendFileSync', function (path, str) {
flushedOutput += str;
});
// call the event handler
exitHandler.call(process);
// the first line is sent immediately to _write and there is nothing we can do about that
flushedOutput.match(new RegExp(line, 'g')).length.should.eql(9);
});
}
});
});

View File

@ -38,28 +38,6 @@ describe('Http Connector', function () {
};
}
function whichMocksMessage(prep) {
return function (req, params, cb) {
process.nextTick(function () {
var incom = new MockIncommingMessage();
if (prep) {
prep(incom);
}
cb(incom);
});
};
}
function whichErrorsAfterPartialBody(err) {
return function (incom) {
incom.statusCode = 200;
incom.push('{ "hits": { "hits": { "hits": { "hits": { "hits": { "hits": ');
setTimeout(function () {
incom.emit('error', err || new Error('Socket is dead now...'));
}, 20);
};
}
describe('Constructor', function () {
it('creates an object that extends ConnectionAbstract', function () {
var con = new HttpConnection(new Host());
@ -259,7 +237,17 @@ describe('Http Connector', function () {
describe('#request with incomming message error', function () {
function makeStubReqWithMsgWhichErrorsMidBody(err) {
return makeStubReqMethod(whichMocksMessage(whichErrorsAfterPartialBody(err)));
return makeStubReqMethod(function (req, params, cb) {
process.nextTick(function () {
var incom = new MockIncommingMessage();
incom.statusCode = 200;
setTimeout(function () {
incom.emit('data', '{ "not json"');
incom.emit('error', err || new Error('Socket is dead now...'));
}, 20);
cb(incom);
});
});
}
it('logs error event', function (done) {

View File

@ -1,27 +1,27 @@
var Log = require('../../src/lib/log');
var StreamLogger = require('../../src/lib/loggers/stream');
var MockWritableStream = require('../mocks/writable_stream');
var MockOldWritableStream = require('../mocks/old_writable_stream');
var once = require('events').EventEmitter.prototype.once;
var stream = new MockWritableStream();
var _ = require('lodash');
var util = require('util');
var parentLog;
var stub = require('./auto_release_stub').make();
beforeEach(function () {
parentLog = new Log();
if (stream._writableState.buffer.length) {
// empty the buffer manually
stream._writableState.buffer.splice(0);
}
stub(stream, 'write');
stub(stream, 'end');
parentLog = new Log();
});
afterEach(function () {
parentLog.close();
if (stream._writableState && stream._writableState.buffer.length) {
// empty the buffer manually
stream._writableState.buffer.splice(0);
}
});
function makeLogger(parent, levels) {
@ -34,41 +34,60 @@ function makeLogger(parent, levels) {
}
describe('Stream Logger', function () {
describe('buffer flushing', function () {
it('writes everything in the buffer to console.error', function () {
var logger = makeLogger();
var line = 'This string is writte 10 times to create buffered output.\n';
// get the last handler for process's "exit" event
var exitHandlers = process._events.exit;
var exitHandler = _.isArray(exitHandlers) ? _.last(exitHandlers) : exitHandlers;
// allow the logger to acctually write to the stream
stream.write.restore();
// write the line 10 times
_.times(10, function () {
logger.onDebug(line);
});
// collect everything that is written to console.error
var flushedOutput = '';
stub(console, 'error', function (str) {
flushedOutput += str;
});
// call the event handler
exitHandler.call(process);
// restore console.error asap.
console.error.restore();
// the first line is sent immediately to _write and there is nothing we are not going to worry about it
flushedOutput.match(new RegExp(line, 'g')).length.should.eql(9);
});
});
require('./generic_logger_tests')(makeLogger);
describe('buffer flush', function () {
if (require('stream').Writable) {
it('writes everything in the buffer to console.error', function () {
var logger = makeLogger();
var line = 'This string is written 10 times to create buffered output\n';
// get the last handler for process's "exit" event
var exitHandlers = process._events.exit;
var exitHandler = _.isArray(exitHandlers) ? _.last(exitHandlers) : exitHandlers;
// allow the logger to acctually write to the stream
stream.write.restore();
// write the line 10 times
_.times(10, function () {
logger.onDebug(line);
});
// collect everything that is written to console.error
var flushedOutput = '';
stub(console, 'error', function (str) {
flushedOutput += str;
});
// call the event handler
exitHandler.call(process);
// restore console.error asap.
console.error.restore();
// the first line is sent immediately to _write and there is nothing we are not going to worry about it
flushedOutput.should.match(new RegExp(line));
flushedOutput.match(new RegExp(line, 'g')).length.should.eql(9);
});
} else {
it('does not fall apart with non streams2 streams', function () {
var exitHandler;
stub(process, 'once', function (event, handler) {
if (event === 'exit') {
exitHandler = handler;
}
once.call(process, event, handler);
});
var logger = makeLogger();
(function () {
// call the event handler
exitHandler.call(process);
}).should.not.throw();
});
}
});
});

View File

@ -385,19 +385,20 @@ describe('Utils', function () {
should.not.exist(_.getUnwrittenFromStream({}));
});
var MockWritableStream = require('../mocks/writable_stream');
if (require('stream').Writable) {
var MockWritableStream = require('../mocks/writable_stream');
it('ignores empty stream', function () {
var stream = new MockWritableStream();
_.getUnwrittenFromStream(stream).should.be.exactly('');
});
it('ignores empty stream', function () {
var stream = new MockWritableStream();
_.getUnwrittenFromStream(stream).should.be.exactly('');
});
it('returns only what is in the buffer', function () {
var stream = new MockWritableStream();
stream.write('hot');
stream.write('dog');
_.getUnwrittenFromStream(stream).should.be.exactly('dog');
});
it('returns only what is in the buffer', function () {
var stream = new MockWritableStream();
stream.write('hot');
stream.write('dog');
_.getUnwrittenFromStream(stream).should.be.exactly('dog');
});
}
});
});