Initial work on the server

This commit is contained in:
Abhishek Das
2013-03-25 06:08:51 +05:30
parent 93400554fd
commit 0485272d93
626 changed files with 121311 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
var common = require('../../common');
var assert = require('assert');
var pool = common.createPool({
connectionLimit : 1,
waitForConnections : false
});
pool.getConnection(function(err, connection) {
if (err) throw err;
pool.getConnection(function(err) {
assert.ok(err);
var shouldGetConnection = false;
pool.config.waitForConnections = true;
pool.getConnection(function(err, connection2) {
if (err) throw err;
assert.ok(shouldGetConnection);
assert.strictEqual(connection, connection2);
pool.end();
});
shouldGetConnection = true;
connection.end();
});
});