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

Commits on Oct 25, 2022

  1. Add additional diagnostic to error message

    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 committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    cb1bd7d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bb14eaa View commit details
    Browse the repository at this point in the history
  3. Fix CDescriptorOldTests.testDescriptorCreation instability

    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
    jonahgraham committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    98f45c7 View commit details
    Browse the repository at this point in the history
  4. Restore completion filter after testing preference

    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
    jonahgraham committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    178dbfa View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2022

  1. Configuration menu
    Copy the full SHA
    b0313d1 View commit details
    Browse the repository at this point in the history
  2. Remove projects from workspace at test startup

    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 committed Oct 26, 2022
    Configuration menu
    Copy the full SHA
    ead0351 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    47c5e1f View commit details
    Browse the repository at this point in the history