| 33 | } |
| 34 | |
| 35 | function assertNewConnection(newConnection, oldConnection) { |
| 36 | switch (dialect) { |
| 37 | case 'postgres': |
| 38 | expect(oldConnection.processID).to.not.be.equal(newConnection.processID); |
| 39 | break; |
| 40 | |
| 41 | case 'mariadb': |
| 42 | case 'mysql': |
| 43 | expect(oldConnection.threadId).to.not.be.equal(newConnection.threadId); |
| 44 | break; |
| 45 | |
| 46 | case 'db2': |
| 47 | expect(newConnection.connected).to.be.ok; |
| 48 | expect(oldConnection.connected).to.not.be.ok; |
| 49 | break; |
| 50 | |
| 51 | case 'mssql': |
| 52 | // Flaky test |
| 53 | expect(newConnection.dummyId).to.not.be.ok; |
| 54 | expect(oldConnection.dummyId).to.be.ok; |
| 55 | break; |
| 56 | |
| 57 | default: |
| 58 | throw new Error('Unsupported dialect'); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | function attachMSSQLUniqueId(connection) { |
| 63 | if (dialect === 'mssql') { |