-
Notifications
You must be signed in to change notification settings - Fork 1k
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 warnings in CLI destroy tests #6455
Conversation
Thanks @Josh-Walker-GM - found this while reviewing your PR - much appreciated! |
Co-authored-by: Daniel Choudhury <[email protected]>
Yes ideally we can move this over to the syntax you're using! I tried this earlier today but didn't have enough time to debug why my changes made the tests fail!
Definitely 💫 |
Thought I should have a go fixing the issue given my changes highlighted/caused it 😆 |
If you wish I can take a look at updating the remaining tests so they await the files and other async calls? This is best in another PR but is it okay if I update all the remaining tests within that one PR? |
In theory this could lead to tests passing without the correct behaviour, no? |
Yes - that’s right 🙂. Are you happy to do the changes in this PR? Then I’ll wait to merge |
Very happy to update the rest within this PR. I hopefully won't run into any tests which currently pass due to the async but in theory shouldn't when sync'd. If I run into any difficulties that I can't solve I'll update here too if that's fine? |
Yes ofcourse, that’s great. I think the other destroy commands don’t have the async problem anyway, so should be straightforward! |
I did a pass through the tests and a few local runs and didn't notice any other issues with the tests. I removed an unneeded |
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.
Thank you again Josh, on 🔥
Problem
See #6450 which discusses a warning for the destroy tests related to cells.
I was able to replicate the issue locally when restricting the number of threads used within the test:
Solution
Ensure async functions are awaited.
Changes
beforeEach
as it's not needed before each test given the second test needs different files mock.await
allfiles(...)
callsawait
listr task run before expecting testsQuestions
files
- this is also an issue?