MCPcopy
hub / github.com/sequelize/sequelize / secondTransaction

Function secondTransaction

test/integration/transaction.test.js:159–173  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157 };
158
159 const secondTransaction = async () => {
160 await delay(500);
161 await this.sequelize.transaction({ isolationLevel }, async t => {
162 await Dots.update({ color: 'green' }, {
163 where: { color: 'red' },
164 transaction: t
165 });
166
167 // Sanity check - in this test we want this line to be reached before the
168 // first transaction gets to commit
169 expect(firstTransactionGotNearCommit).to.be.false;
170
171 secondTransactionGotNearCommit = true;
172 });
173 };
174
175 await expect(
176 Promise.all([firstTransaction(), secondTransaction()])

Callers 1

Calls 2

transactionMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected