Prepare for 2023.3: Move tests using MyMockApplication to unittests #5421
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If I understand this correctly, the problem existed from the beginning, it has been revealed by this change:
JetBrains/intellij-community@c973850#diff-4497b4c4afdd25574053db8b6de01a43669c1b3200a5d4d31d14da002614e400L956
In the old IntelliJ versions, if I understand correctly, the tests were successful because
Since the commit c973850dd, the dispatch thread assertion is not delegated to the Application any more, but it is done by ThreadingAssertions.assertEventDispatchThread, which is not implemented in MockApplicaion, hence it really checks whether the thread is EDT.
For this reason, we would like to separate all tests relying on MyMockApplication from the ones relying on the real Application. This would not solve the race fully, but at least it wouldn't lead to a case where a task scheduled by real Application is run by MockApplication
Checklist
Please note that the maintainers will not be reviewing this change until all checkboxes are ticked. See
the Contributions section in the README for more
details.
Discussion thread for this change
Issue number:
<please reference the issue number or url here>
Description of this change