lovely fixes

This commit is contained in:
javi
2011-12-07 13:06:23 +01:00
parent 5084e69aff
commit b53bcceb6d
2 changed files with 19 additions and 8 deletions
+3 -2
View File
@@ -131,11 +131,12 @@ tests['should send command'] = function() {
tests['should send commands on connect'] = function() {
// first create queue
var queue = new varnish.VarnishQueue('127.0.0.1', 1234)
for(var i = 0; i < 5; ++i) {
for(var i = 0; i < 10; ++i) {
queue.run_cmd('purge simon_is == gay');
}
// then server
var server = VarnishEmu(null, 1234)
setTimeout(function() { assert.equal(5, server.commands); }, 1000);
//wait 2 seconds because the client tries every second the reconnection
setTimeout(function() { assert.equal(10, server.commands); }, 2000);
}