-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
[WIP] fixes for ember-source@3.13 #450
Conversation
I ran this on our integration tests and found it completes running the tests. 70 tests fail that did not in prior versions of ember but that makes me think the assertions are off or something has changed to warrant the tests failing. Without this change integration tests fail on unhandled errors within ember-mocha itself and the browser reloads at about halfway through the suite. |
hmm... I assume that it was originally implemented like that for a reason, and I'm a little worried that we're accidentally breaking things with this PR 🤔 |
@Turbo87 I feel the same way :). I stumbled upon this approach by looking at what ember-qunit does for |
From exploring the blame it appears the logic I removed in |
@simonihmig do you have time to take a look at this? 🙏 |
I am afraid at this point in time I am of limited use here. But I recently started to upgrade an Ember with a large ember-mocha test suite to 3.13 (with a bunch of failing tests, but so far different issues). So I might eventually run into the same issues maybe...
What's the error message? And that happens only for Ember 3.13 if I got you right? |
@simonihmig thank you for the added insight; points 1 and 2 make sense. Correct; we only see this when updating to 3.13.x (we are on 3.12). The specific failure in my test suite was |
Thanks for the investigation into this @efx, for what it's worth, this patch has resolved my issue on 3.14-beta.2. |
@simonihmig thank you for the thorough investigation!
This is a helpful summary. I did some bisecting in this comment and I think emberjs/ember.js@f046bbe introduced some of the related logic.
This confirms my suspicion that while my PR removes logic showing the bug it indeed is not the correct fix. So it seems we need to implement test set up and tear down that accounts for the changed semantics of ember setters / getters in 3.13.x. |
I tried a simpler approach of the existing logic: https://github.com/emberjs/ember-mocha/compare/master...efx:fix-430-1?expand=1. These changes should preserve the garbage collection between tests. It works reliably for |
Without digging into the internals it does look like QUnit does not reuse properties on I have linked ember-source locally and given a quick analog in ember-qunit it appears that the |
See the discussion in #431. I think this may be the underlying issue in #430 and blocking TryGhost/Admin#1335.
Without the changes to
setup-test.js
the first test I added fails. I observed this in my application as well. It appeared that properties set onthis
in abeforeEach
no longer persisted between tests.Upon removing the caching behavior in
setup-test.js
the first test passes as I expect. I would like to understand why this is the case though.assign
ormerge
? Or what purpose did that logic serve when introduced?The second test I added fails with a helpful message about
name
being a tracked property. I would expect this to fail so should I assert that it does fail?