-
Notifications
You must be signed in to change notification settings - Fork 190
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 many of the test issues in #117 #118
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It may be that this test fails regularly because another test is not cleaned up properly. Make sure there are no unexpected projects in the workspace. Part of eclipse-cdt#117
15 tasks
This old test had a race condition. The failing test was trying to verify that CDTPROJECT_ADDED was received, but if there was a delay in the startup then another event would come in later. So for this test use the first received event, for the remaining tests use the last received event. Part of eclipse-cdt#117
On GitHub actions the org.eclipse.cdt.ui.tests.text.contentassist2 tests are running after ProposalFilterPreferencesTest and ProposalFilterPreferencesTest was changing the default filter and not restoring it. Part of eclipse-cdt#117
bddb5fe
to
178dbfa
Compare
5ce95b7
to
d4787a8
Compare
Various tests are not cleaning up properly after themselves, causing test failures on subsequent tests. Therefore start each test by deleting all projects. In addition, some tests were creating their test projects in their constructor. As all the constructors run before all the tests as part of test discovery it means that projects were being created in constructor and interfering with other tests later. With the deleting of all projects in @AfterEach these tests would have started failing. Therefore, change these tests to create their projects and do other initialize tasks in the setUp method. For older JUnit3 style tests: This substantially slows down tests as many tests rely on sharing the project between multiple tests and recreating those projects on each run is slow. Therefore this is not applied universally to all JUnit3 tests. For tests that are affected, those tests are moved to JUnit5 base test. Part of eclipse-cdt#117
d4787a8
to
47c5e1f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
See #117