Skip to content
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 7 commits into from
Oct 26, 2022

Conversation

jonahgraham
Copy link
Member

See #117

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
@jonahgraham jonahgraham mentioned this pull request Oct 25, 2022
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
@github-actions
Copy link

github-actions bot commented Oct 25, 2022

Test Results

     612 files       612 suites   17m 11s ⏱️
10 253 tests 10 231 ✔️ 21 💤 1
10 216 runs  10 194 ✔️ 21 💤 1

For more details on these failures, see this check.

Results for commit 47c5e1f.

♻️ This comment has been updated with latest results.

@jonahgraham jonahgraham force-pushed the test_fixes_117 branch 2 times, most recently from 5ce95b7 to d4787a8 Compare October 26, 2022 01:32
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
@jonahgraham jonahgraham merged commit 949d46c into eclipse-cdt:main Oct 26, 2022
@jonahgraham jonahgraham deleted the test_fixes_117 branch October 26, 2022 02:56
@jonahgraham jonahgraham added the releng Release engineering and project management label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
releng Release engineering and project management
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant