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