-
Notifications
You must be signed in to change notification settings - Fork 191
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
More test stability fixes #120
More test stability fixes #120
Commits on Nov 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for f707199 - Browse repository at this point
Copy the full SHA f707199View commit details -
Use correct version of GDB on Jenkins
In 56ee2c3 I got github actions working by using default GDB on GHA, but on Jenkins we should continue to use CDT's pre-built version of GDB. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 1251f6b - Browse repository at this point
Copy the full SHA 1251f6bView commit details -
Convert pdom tests to JUnit5 format
This will allow, if needed, to mark tests as flaky Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 41ab286 - Browse repository at this point
Copy the full SHA 41ab286View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cfff65 - Browse repository at this point
Copy the full SHA 6cfff65View commit details -
Fail test if there are any files left over in the workspace directory
Some tests sort of clean up after themselves, but still leave files around. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for f3d1267 - Browse repository at this point
Copy the full SHA f3d1267View commit details -
Remove incorrect assumptions of lifecycle of test
Maybe once upon a time this lifecycle did something, but now in setUp fProject is always null and therefore the project was never getting deleted as the fProject that deleteProject saw was different than the tests. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for c9c9b17 - Browse repository at this point
Copy the full SHA c9c9b17View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d1abe1 - Browse repository at this point
Copy the full SHA 6d1abe1View commit details -
Configuration menu - View commit details
-
Copy full SHA for e04e023 - Browse repository at this point
Copy the full SHA e04e023View commit details -
Delete contents on disk when cleaning up after test
The resource helper is widely used, but when it deletes projects, it leaves their contents on disk. Fix this so that the contents on disk is deleted. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for aba8b23 - Browse repository at this point
Copy the full SHA aba8b23View commit details -
Better test error messages when workspace is not empty after test
On GHA the error does not really give a good indication of what went wrong with minimal to no stack traces Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 95524a0 - Browse repository at this point
Copy the full SHA 95524a0View commit details -
Remove test for code that is no longer supported
Ideally the code itself should also be deleted from CDT, but this test is super flaky and I cannot seem to convert it to JUnit5 so I can properly mark it as flaky. Therefore the test is now simply gone. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 8879798 - Browse repository at this point
Copy the full SHA 8879798View commit details -
Convert more of the tests to JUnit5
Some of these tests left behind projects, by chaning them to extend BaseTestCase5 the resource cleanup happens and the tests are cleaned up properly Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 95b10be - Browse repository at this point
Copy the full SHA 95b10beView commit details -
Delete projects fully at the end of tests
This code seems to be trying to optimize across tests. This change isolated each individual test better. Also removed is a bunch of effectively unused test code. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for a28fbaf - Browse repository at this point
Copy the full SHA a28fbafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8974260 - Browse repository at this point
Copy the full SHA 8974260View commit details -
Delete test that was never run
This is an ancient (2004) test that does not apply, was never referenced in the Suites and whose name doesn't match standard pattern. It tried to import ancient versions of projects as well, which would kick off the project converter UI that can't be disabled from the core plug-in. All in all, this test adds nothing of value. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 3b93d3f - Browse repository at this point
Copy the full SHA 3b93d3fView commit details -
Make ASTWriterTester abstract so it doesn't look like a test
JDT thinks this is a test and will run it in the IDE and display an error. But it is only used to compose other tests, by making it abstract the IDE won't see it anymore. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for c8a6953 - Browse repository at this point
Copy the full SHA c8a6953View commit details -
There is a new way to mark tests as failing
And by "new" I mean 15 years old. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 72c55b9 - Browse repository at this point
Copy the full SHA 72c55b9View commit details -
While it may be that the tests don't directly rely on JUnit5, the IDE requires JUnit5 in the classpath or else the launch config doesn't work with this error: Cannot find class 'org.junit.platform.commons.annotation.Testable' on project build path. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 695a63b - Browse repository at this point
Copy the full SHA 695a63bView commit details -
Make sure not to lose stack trace when a test fails. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for ad2177a - Browse repository at this point
Copy the full SHA ad2177aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b21f4f - Browse repository at this point
Copy the full SHA 5b21f4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 658ac45 - Browse repository at this point
Copy the full SHA 658ac45View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5dbb36 - Browse repository at this point
Copy the full SHA d5dbb36View commit details -
Configuration menu - View commit details
-
Copy full SHA for a6ba37d - Browse repository at this point
Copy the full SHA a6ba37dView commit details -
Convert to JUnit5 and cleanup resources
Also stop catching exceptions and discarding stacktraces Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 2fcbee3 - Browse repository at this point
Copy the full SHA 2fcbee3View commit details -
The test "abused" the JUnit3 ability to control test order and required all tests to run in the given order to work. Refactored the test to remove all redundant try/catch and provide a more traditional flow. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 5d8de2c - Browse repository at this point
Copy the full SHA 5d8de2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 71a2fa1 - Browse repository at this point
Copy the full SHA 71a2fa1View commit details -
Instead of using assertTrue, but assertEquals we get nice error messages that show the contents of the collections. Using assertEquals(List.of() instead of assertArrayEquals(... because that gives nicer error messages. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 6518d81 - Browse repository at this point
Copy the full SHA 6518d81View commit details -
Delete test for CDT 2.x functionality
Rather than update this test, simply delete this test of ancient functionality Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 9bf8421 - Browse repository at this point
Copy the full SHA 9bf8421View commit details -
Make tests inherit from BaseTestCase or BaseTestCase5
This provides the shared pre/post condition assertions to help make sure tests are running in a clean environment. If I had time I would convert all the tests to BaseTestCase5 which is JUnit5, but I only did the tests that had something wrong with them. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 9c6bc92 - Browse repository at this point
Copy the full SHA 9c6bc92View commit details -
Place each test run in its own project
This helps add some isolation between tests in case background threads are accessing a project. However I am not sure this solves any of the actual outstanding flaky tests. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for e4b8ae5 - Browse repository at this point
Copy the full SHA e4b8ae5View commit details -
Wait until all threads are stopped before continuing test
These tests all had the same mistake, they had 5 x waitForEvent with the comment "at this point all 5 threads should be stopped" but there are actually 6 threads (5 spawned ones + main thread). Most of the time all 6 threads would be stopped in time, but sometimes one of them wouldn't be stopped, leading to a "CoreException: Context is running" error in the test This fixes the ThreadStackFrameSyncTest item Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 059e16d - Browse repository at this point
Copy the full SHA 059e16dView commit details -
Include the full stack trace in exception message
The format of this error message used to look like: ```java Expected number (0) of Non-OK status objects in log differs from actual (1). Error while parsing /projC_testTripleDownwardV/h3.h. java.lang.reflect.InvocationTargetException Caused by: java.lang.reflect.InvocationTargetException Caused by: java.lang.AssertionError: Need to hold a write lock to clear result caches ``` and it was hard to impossible to identify what the cause is. The hope is that capturing this fuller stack trace into the log will make it easier to identify the problem. Part of eclipse-cdt#117
Configuration menu - View commit details
-
Copy full SHA for 3e63144 - Browse repository at this point
Copy the full SHA 3e63144View commit details