Skip to content

Commit

Permalink
Add a ping test to the set of tests and make it default.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Negrea committed Apr 1, 2015
1 parent 76254cc commit 17e5095
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions rest-tests/stress/stress.js
Expand Up @@ -43,7 +43,18 @@ function post(uri, body) {
return deferred.promise;
}

function callRest(task, callback) {
function pingTest(task, callback) {
return q(post('/ping/async'))
.then(function(response) {
callback();
})
.catch(function(err){
console.log(err);
callback(err);
});
}

function numericMetricTest(task, callback) {
var tenantId = uuid.v4();
var metricId = uuid.v4();

Expand Down Expand Up @@ -102,7 +113,7 @@ if (cluster.isMaster) {
}
};

var rolling = async.queue(callRest, 200);
var rolling = async.queue(pingTest, 200);

for(var i=0; i<100000; i++){
rolling.push({}, rollingCallback);
Expand Down

0 comments on commit 17e5095

Please sign in to comment.