Closed jay-meister closed 1 year ago
How long are we talking? (seconds or minutes...?) 🤔
The test hangs for about 1 - 2 minutes before actually closing the connection and giving me the results of the test.
From what I can tell, it does close the connections instantly, but the tests still seem hang for about 2 minutes.
@SimonLab was wondering if it was something to do with the default idleTimeoutMillis property in the config.
var config = {
user: 'foo', //env var: PGUSER
database: 'my_db', //env var: PGDATABASE
password: 'secret', //env var: PGPASSWORD
host: 'localhost', // Server hosting the postgres database
port: 5432, //env var: PGPORT
max: 10, // max number of clients in the pool
idleTimeoutMillis: 30000, // how long a client is allowed to remain idle before being closed
};
I have a teardown test:
The test hangs for about 1 - 2 minutes before actually closing the connection and giving me the results of the test.
I have registered another
server.on('stop', () => console.log('stopping'));
event listener which gets called immediately and I have logged in the module itself, the event emitter and listener are working fine and PG_CON has length 2.