mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
failing test (currently ignored) for pure js connection error handling
This commit is contained in:
parent
cc77a67745
commit
7fb6c430df
@ -1,4 +1,5 @@
|
||||
var helper = require(__dirname + '/test-helper');
|
||||
var sys = require('sys')
|
||||
|
||||
var createErorrClient = function() {
|
||||
var client = helper.client();
|
||||
@ -95,3 +96,29 @@ test('when connecting to invalid host', function() {
|
||||
assert.emits(client, 'error');
|
||||
client.connect();
|
||||
})
|
||||
|
||||
test('multiple connection errors (gh#31)', function() {
|
||||
test('with single client', function() {
|
||||
return false;
|
||||
//don't run yet...this test fails...need to think of fix
|
||||
var client = new Client({
|
||||
user: 'blaksdjf',
|
||||
password: 'omfsadfas',
|
||||
host: helper.args.host,
|
||||
port: helper.args.port,
|
||||
database: helper.args.database
|
||||
})
|
||||
client.connect();
|
||||
assert.emits(client, 'error', function(e) {
|
||||
client.connect();
|
||||
assert.emits(client, 'error')
|
||||
})
|
||||
})
|
||||
|
||||
test('with callback method', function() {
|
||||
var badConString = "tcp://aslkdfj:oi14081@"+helper.args.host+":"+helper.args.port+"/"+helper.args.database;
|
||||
return false;
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user