working on integration test

This commit is contained in:
brianc 2010-10-10 23:02:50 -05:00
parent a7c5a81829
commit cf5bcaa140
2 changed files with 4 additions and 17 deletions

View File

@ -13,31 +13,16 @@ var makeClient = function() {
return client;
};
var client1 = makeClient();
client1.connect();
client1.on('ReadyForQuery', function() {
console.log('client1 ready for query');
client1.disconnect();
});
var client2 = makeClient();
client2.connect();
client2.on('ReadyForQuery', function() {
console.log('client2 ready for query');
client2.disconnect();
});
var client3 = makeClient();
client3.connect();
client3.on('ReadyForQuery', function() {
console.log('client3 ready for query');
});
client3.query('create temporary table bang (id integer)');
client3.query('insert into bang(id) VALUES(1)');
var query = client3.query('select * from bang');
query.on('row', function(data) {
console.log(data);
query.on('row', function(row) {
console.log(row);
});
query.on('end', function() {
client3.disconnect();

View File

@ -0,0 +1,2 @@
Client = require(__dirname+'/../../lib/client');
sys = require('sys');