mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Change network partition test to wait for client socket creation prior to destroy
This commit is contained in:
parent
3ac356a812
commit
2dc5c6864b
@ -65,10 +65,12 @@ var testServer = function (server, cb) {
|
||||
server.close(cb)
|
||||
})
|
||||
|
||||
// after 50 milliseconds, drop the client
|
||||
setTimeout(function () {
|
||||
server.drop()
|
||||
}, 50)
|
||||
server.server.on('connection', () => {
|
||||
// after 50 milliseconds, drop the client
|
||||
setTimeout(function () {
|
||||
server.drop()
|
||||
}, 50)
|
||||
})
|
||||
|
||||
// blow up if we don't receive an error
|
||||
var timeoutId = setTimeout(function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user