不要怂,就是干,撸起袖子干!

Commit 657aa37f by Ruben Bridgewater

Fix possibility of a race condition in a test

1 parent a1a13bd1
Showing with 13 additions and 14 deletions
...@@ -318,20 +318,19 @@ describe(Support.getTestDialectTeaser('Include'), function() { ...@@ -318,20 +318,19 @@ describe(Support.getTestDialectTeaser('Include'), function() {
Task.belongsTo(Project); Task.belongsTo(Project);
return this.sequelize.sync({force: true}).then(function() { return this.sequelize.sync({force: true}).then(function() {
return Promise.all([ return Project.bulkCreate([{ id: 1 }, { id: 2 }]);
Project.bulkCreate([{ id: 1 }, { id: 2 }]), }).then(function (projects) {
User.create({ return User.create({
Tasks: [ Tasks: [
{ProjectId: 1}, {ProjectId: 1},
{ProjectId: 2}, {ProjectId: 2},
{ProjectId: 1}, {ProjectId: 1},
{ProjectId: 2} {ProjectId: 2}
] ]
}, { }, {
include: [Task] include: [Task]
}) });
]); }).then(function (user) {
}).spread(function (projects, user) {
return User.find({ return User.find({
where: { where: {
id: user.id id: user.id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!