-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGFIX] Await potentially async operations #6301
Conversation
packages/-ember-data/tests/integration/record-array-manager-test.js
Outdated
Show resolved
Hide resolved
I opened emberjs/ember.js#18225 for the failing model tests, as it represents a regression in observer behavior that may have performance impacts. |
I'd rather update to https://github.com/emberjs/ember-qunit/releases/tag/v4.5.1 than add @runspired - This is the change we discussed in discord, basically in ember-qunit@4.5.1 we now allow a small "settling" period before triggering the test isolation errors. |
#6325 does that ember-qunit update |
Some operations in Ember Data flush using `run.join`. This will flush _synchronously_ if no runloop or autorun currently exists, but will join the existing runloop otherwise, making the scheduled task effectively asynchronous. With the tracked properties feature flag enabled, the way we've scheduled autoruns has changed. A few Data tests were failing because they were expecting an operation to flush synchronously, but it flushed asynchronously due to an existing autorun. This PR adds appropriate `await settled();` statements in these cases.
99f95a4
to
1727a0e
Compare
dropped commits for unnecessary async tests now that #6325 has landed |
f85c6c8
to
25fdc95
Compare
@@ -367,7 +368,11 @@ module('unit/model/rollbackAttributes - model.rollbackAttributes()', function(ho | |||
}); | |||
|
|||
test("invalid record's attributes can be rollbacked", async function(assert) { | |||
assert.expect(12); | |||
if (gte('3.13.0')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should be 3.13.0-beta.1
, right? Otherwise it will continue to fail until 3.13.0 is released as stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gte treats beta as satisfying this
Some operations in Ember Data flush using
run.join
. This will flushsynchronously if no runloop or autorun currently exists, but will
join the existing runloop otherwise, making the scheduled task
effectively asynchronous.
With the tracked properties feature flag enabled, the way we've
scheduled autoruns has changed. A few Data tests were failing because
they were expecting an operation to flush synchronously, but it flushed
asynchronously due to an existing autorun. This PR adds appropriate
await settled();
statements in these cases.