| 425 | describe(class="st">'deadlock handling', () => { |
| 426 | class="cm">// Create the `Task` table and ensure it's initialized with 2 rows |
| 427 | const getAndInitializeTaskModel = async sequelize => { |
| 428 | const Task = sequelize.define(class="st">'task', { |
| 429 | id: { |
| 430 | type: Sequelize.INTEGER, |
| 431 | primaryKey: true |
| 432 | } |
| 433 | }); |
| 434 | |
| 435 | await sequelize.sync({ force: true }); |
| 436 | await Task.create({ id: 0 }); |
| 437 | await Task.create({ id: 1 }); |
| 438 | return Task; |
| 439 | }; |
| 440 | |
| 441 | class="cm">// Lock the row with id of `from`, and then try to update the row |
| 442 | class="cm">// with id of `to` |
no test coverage detected