mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Merge pull request #1677 from sehrope/fix-network-partition-test-race
Fix network partition test race
This commit is contained in:
commit
1cbd507b8c
@ -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