Fix a few more failing tests
This commit is contained in:
parent
e99f8d59a6
commit
c5d4207aac
@ -7,7 +7,7 @@ var NativeQuery = require('./query');
|
||||
|
||||
var Client = module.exports = function(config) {
|
||||
EventEmitter.call(this);
|
||||
this.native = new Native();
|
||||
this.native = new Native(require('pg-types'));
|
||||
this._queryQueue = [];
|
||||
this._connected = false;
|
||||
|
||||
@ -106,6 +106,9 @@ Client.prototype.query = function(config, values, callback) {
|
||||
|
||||
Client.prototype.end = function(cb) {
|
||||
var self = this;
|
||||
if(!this._connected) {
|
||||
this.once('connect', this.end.bind(this, cb));
|
||||
}
|
||||
this.native.end(function() {
|
||||
//send an error to the active query
|
||||
if(self._hasActiveQuery()) {
|
||||
|
@ -81,4 +81,3 @@ test('client end during query execution of prepared statement', function() {
|
||||
client.end();
|
||||
}));
|
||||
});
|
||||
return console.log('query-error-handling-prepared-statement-tests: GET TO PASS');
|
||||
|
@ -1,7 +1,6 @@
|
||||
//test for issue #320
|
||||
//
|
||||
var helper = require('./test-helper');
|
||||
return console.log('quick-disconnecte-tests: GET TO PASS');
|
||||
|
||||
var client = new helper.pg.Client(helper.config);
|
||||
client.connect();
|
||||
|
@ -1,3 +1,4 @@
|
||||
var helper = require(__dirname + "/test-helper")
|
||||
return console.log('BAD RACE CONDITION');
|
||||
helper.testPoolSize(10);
|
||||
helper.testPoolSize(11);
|
||||
|
Loading…
Reference in New Issue
Block a user