Community
Participate
Working Groups
57 Junit tests are failing, see http://download.eclipse.org/eclipse/downloads/drops/I20080314-1059/testResults.php This is due to the two functions org.eclipse.ua.tests.util.ResourceFinder.findFile(Plugin, String) and org.eclipse.ua.tests.util.ResourceFinder.findFiles(Plugin, String, String, boolean) both of which have started returning incorrect results since P2 was introduced.
Test org.eclipse.ua.tests.help.dynamic.XMLProcessorTest.testXMLProcessor() is not showing up as a failure but is not behaving correctly. The test looks for all xml files in a particular directory and performs a check on each one. No tests are found and the test passes without performing the necessary checks on each file.
I'll be anxiously awaiting the details of the assumptions and fixes made here ... I suspect we have lots of similar cases in WTP ... perhaps in code, and not just tests!
Created attachment 92667 [details] patch This fixes the failing tests. Rather than search for all of the files in a directory with a particular extension I have recoded some of the tests to hard code the names of the test cases, this was the test does not rely as heavily on the file finding algorithm.
The change we made in the tests was to install the test plug-ins under eclipse/dropins/eclipse/plugins rather than directly in eclipse/plugins, so that they would be discovered automatically on startup. Ultiimately we'd like to leverage p2 within the test setup and install test plugins directly into eclipse/plugins again. This was just the quickest and least disruptive way to get the tests working with p2 (so we thought). We ran various platform and JDT tests this was and they were all successful, but it turns out there are a few tests that are making assumptions about the location of test plugins on disk. Tests should instead be using org.eclipse.core.runtime.FileLocator to ask the platform for artifacts in the plugin install directory rather than assuming it is eclipse/plugins. Chris, if you have more trouble with this, feel free to ping me or DJ tomorrow for further assistance.
This is now fixed, the tests all passed on N20080316-2000 on Windows.