-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
chore: improve Engine tests stability #18949
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
chore: improve Engine tests stability #18949
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
hey @Nodonisko I think you've just found a bug, that initializing the AccountTrackerController with an empty state, it's not allowing it to initialize as it intends to do IMO. I will double check that, but doesn't make sense to me the default state be an empty object instead of getting the network from Network Controller |
|
@tommasini Thanks for feedback, so correct fix would to put some default network there instead of empty object? |
|
@Nodonisko The team responsible for addressing the issue was notified, feel free to address the test to the expected behaviour for now cc: @salimtb |
|
@Nodonisko Thanks for looking into this. Just bouncing thoughts on your question about the failing unit test for non matching AccountTrackerController data - I'm looking at the controller repo code and by default, the state should resemble the expected state that the test is showing. I would consider this a real test failure if that is being overridden to an empty object. @tommasini It looks like that data is just being wiped right? |
|
Yeah, it seems that when I'm running the unit test on latest main right now, locally, I have the same error. I've talked with @salimtb and @salimtb confirmed that the initialization of AccountsTrackerController is wrong, and will fix it. The issue is here I was suggesting to change the unit test since it's actually showing the actual result that is happening right now in Engine, because we are overriding if initial state is undefined |
|
@tommasini I hotfixed that failing test |
1b03190
into
MetaMask:chore/improve-engine-tests-margelo
Description
Previously only some tests called
destroyEnginemethod after each test and that caused that tests actually relied on running in order etc. Now each tests destroys engine instance so it's much more stable.I still have one more failing test but maybe I should just update that fixture? I am not sure.
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist