Skip to content
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

fix tests #7703

Merged
merged 6 commits into from
Sep 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/-ember-data/tests/integration/store-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ module('integration/store - destroy', function (hooks) {
// to flush, potentially pushing data into the store
await settled();
assert.ok(true, 'we made it to the end');
await requestPromise;
assert.ok(false, 'we should never make it here');
requestPromise.then(() => {
assert.ok(false, 'we should never make it here');
});

await settled();
});
Copy link
Contributor Author

@snewcomer snewcomer Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is now failing on the main branch (see here where tests never finish). I rewrote it a little bit but the main issue was await requestPromise. On first glance, I can't tell what is going wrong here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this was failing on 3.20 (last 3.20 release was https://github.com/emberjs/ember.js/tree/v3.20.7) something has "changed" since the last PRs a week ago. In any case, I distilled the test down a bit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, interesting, it seems like we are asserting that the promise never finishes, it makes sense it would hang the test. We can rewrite this as .then and not hang on it, or just rely on the store.push

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with .then! Thank you!


test('destroying the store correctly cleans everything up', async function (assert) {
Expand Down