Hi there, I’m looking at working on an issue in the GitHub tracker for Buildship. I’ve followed the setup guide, and noticed that with my current setup/target, some unit tests (but no UI tests) are failing in the master branch. Is this an acceptable state for master or these tests to be in, or is this something to do with my environment? And as a contributor wanting to work on a completely unrelated issue, am I expected to do something about these failing tests?
My environment is:
Windows 10 Pro 64 bit
Oracle Java 9.0.4+11
Eclipse 2019-06 (4.12.0, build id 20190614-1200)
Target is Eclipse Oxygen
The failing unit tests are:
1. org.eclipse.buildship.core.internal.workspace.GradleClasspathContainerUpdaterTest."Folders are valid external dependencies"
2. org.eclipse.buildship.core.internal.workspace.LinkedResourcesUpdaterTest."Can define a linked resource"
3. " "."Can define a linked resource even if the resource does not exist"
4. " "."A linked resource is deleted if no longer part of the Gradle model"
5. org.eclipse.buildship.core.internal.configuration.RunConfigurationTest."load default settings"
6. org.eclipse.buildship.core.internal.util.string.PatternUtilsTest."Matching web urls"
7. ??? The JUnit plugin runner says 7 are failing, but I only find 6 failed tests.
All but the "Matching web urls" are to do with file paths, and of those, all but one are because the expected paths abbreviate my user directory with a ~1, and assume my surname, which is placed after a ., is a file extension, and shortens it to three letters.
No, the expectation is that all tests should succeed from the IDE. One thing to mention is that the tests should not be executed on the UI thread, but that’s all.
My guess is that this is an error in the test fixtures that only surfaced on your side. Can you post one stacktrace with the test failure?
Ah, I saw that was the case for UI tests, but didn’t realise it applied to the core unit tests as well. I re-ran them not executing on the UI thread, but got the same results.
Here’s a stack trace example for the pathing errors (changed my username to firstnam.lastname to obscure, but use same number of chars and same formatting):
I’ve found out what’s wrong with RunConfigurationTest. It accidentally reads the configuration from the org.eclipse.buildship.core.test. I’ll push the fix soon. Regarding the other ones, could you please try changing the dir("foo") statements to use canonical paths: dir("foo").canonicalPath.