-
Notifications
You must be signed in to change notification settings - Fork 207
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 some flaky managedbuilder tests #54
Conversation
Don't sleep for a hardcoded time but wait for the actual condition. 1000 ms was often insufficient on my system.
testAbstractBuiltinSpecsDetector_EnvChangesGlobal did not properly clean up after itself, which caused testAbstractBuiltinSpecsDetector_EnvChangesConfiguration_1, testAbstractBuiltinSpecsDetector_EnvChangesConfiguration_2, and testAbstractBuiltinSpecsDetector_EnvChangesGlobal to fail when run for the second time in the same session. Running tests twice is not useful, but happens in Eclipse with a launch configuration set to run all tests in org.eclipse.cdt.managedbuilder.core.tests/tests - once directly and once through AllLanguageSettingsProvidersMBSTestSuite. I have not found any way of running every test exactly once in the GUI.
Thanks @cwalther for fixing some of these tests.
I think this is out of date now - the suites are still in there but we now run (most) tests using the standard patterns in Tycho Surefire. Some of the bundles have exceptions like this one: cdt/core/org.eclipse.cdt.core.tests/pom.xml Lines 57 to 64 in 0158c6a
I'll try an update to the readme. |
as a result of the conversation on PR eclipse-cdt#54 we identified the FAQ on this item was out of date. eclipse-cdt#54 (comment)
as a result of the conversation on PR eclipse-cdt#54 we identified the FAQ on this item was out of date. eclipse-cdt#54 (comment)
as a result of the conversation on PR #54 we identified the FAQ on this item was out of date. #54 (comment)
Thanks! This is working much more conveniently than Bugzilla+Gerrit. |
This fixes some tests that sometimes fail for me when I run them in the Eclipse GUI on Linux.
CProjectDescriptionSerializationTests.testPersistentProperties contained a hardcoded sleep time to wait for an asynchronous operation that was often insufficient. Wait for the actual condition instead.
BuiltinSpecsDetectorTest.testAbstractBuiltinSpecsDetector_EnvChangesGlobal did not properly clean up after itself, which caused it, and some of its siblings, to fail when run for the second time in the same session.
(Running tests twice in the same session is not done deliberately, but it happens in Eclipse with a JUnit Plug-in Test launch configuration set to run all tests in org.eclipse.cdt.managedbuilder.core.tests/tests – once directly and once through AllLanguageSettingsProvidersMBSTestSuite. I have not found any way of running every test exactly once in the GUI – the recommended way seems to be to select org.eclipse.cdt.managedbuilder.tests.suite.AutomatedIntegrationSuite, but that leaves out some tests.)