MCPcopy
hub / github.com/sequelize/sequelize / assertNewConnection

Function assertNewConnection

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

Source from the content-addressed store, hash-verified

33}
34
35function 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
62function attachMSSQLUniqueId(connection) {
63 if (dialect === 'mssql') {

Callers 1

pool.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected