MCPcopy Index your code
hub / github.com/sequelize/sequelize / assertNewConnection

Function assertNewConnection

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

Source from the content-addressed store, hash-verified

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

Callers 1

pool.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected