MCPcopy
hub / github.com/sequelize/sequelize / assertSameConnection

Function assertSameConnection

test/integration/pool.test.js:11–33  ·  view source on GitHub ↗
(newConnection, oldConnection)

Source from the content-addressed store, hash-verified

9const delay = require('delay');
10
11function assertSameConnection(newConnection, oldConnection) {
12 switch (dialect) {
13 case 'postgres':
14 expect(oldConnection.processID).to.be.equal(newConnection.processID).and.to.be.ok;
15 break;
16
17 case 'mariadb':
18 case 'mysql':
19 expect(oldConnection.threadId).to.be.equal(newConnection.threadId).and.to.be.ok;
20 break;
21
22 case 'db2':
23 expect(newConnection.connected).to.equal(oldConnection.connected).and.to.be.ok;
24 break;
25
26 case 'mssql':
27 expect(newConnection.dummyId).to.equal(oldConnection.dummyId).and.to.be.ok;
28 break;
29
30 default:
31 throw new Error('Unsupported dialect');
32 }
33}
34
35function assertNewConnection(newConnection, oldConnection) {
36 switch (dialect) {

Callers 1

pool.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected