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

Commit 657aa37f by Ruben Bridgewater

Fix possibility of a race condition in a test

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