(connection)
| 89 | describe('network / connection errors', () => { |
| 90 | it('should obtain new connection when old connection is abruptly closed', async () => { |
| 91 | function simulateUnexpectedError(connection) { |
| 92 | // should never be returned again |
| 93 | if (dialect === 'mssql') { |
| 94 | connection = attachMSSQLUniqueId(connection); |
| 95 | } |
| 96 | if (dialect === 'db2') { |
| 97 | sequelize.connectionManager.pool.destroy(connection); |
| 98 | } else { |
| 99 | connection.emit('error', { code: 'ECONNRESET' }); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | const sequelize = Support.createSequelizeInstance({ |
| 104 | pool: { max: 1, idle: 5000 } |
no test coverage detected