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

Commit c55127b2 by Jan Aagaard Meier

Fix for intermittent bug in findorcreate with transaction

1 parent 5ad6326b
Showing with 4 additions and 3 deletions
......@@ -172,12 +172,13 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
, firstCreated = first[1]
, secondInstance = second[0]
, secondCreated = second[1];
// Depending on execution order and MAGIC either the first OR the second call should return true
expect(firstCreated ? !secondCreated : secondCreated).to.be.ok // XOR
expect(firstInstance).to.be.ok;
expect(firstCreated).to.be.ok;
expect(secondInstance).to.be.ok;
expect(secondCreated).not.to.be.ok;
expect(firstInstance.id).to.equal(secondInstance.id);
return transaction.commit();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!