Bug 541459

Summary: [win32] Bug_006708.testBug fails with "A resource exists on disk with a different case"
Product: [Eclipse Project] Platform Reporter: Andrey Loskutov <loskutov>
Component: ResourcesAssignee: Andrey Loskutov <loskutov>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 4.10Keywords: test
Target Milestone: 4.10 RC2   
Hardware: PC   
OS: Windows 10   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=538541
https://git.eclipse.org/r/132957
https://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=1867386fc36503af955a34d8152535aa3cf77373
https://git.eclipse.org/r/133136
https://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=ebc7222c4d64cb0c7980a5396326986faf5f2f4c
https://git.eclipse.org/r/133312
https://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=dd2e90d6733b0e90575d2ba29f20fd89e7397227
Whiteboard:

Description Andrey Loskutov CLA 2018-11-22 09:51:15 EST
https://download.eclipse.org/eclipse/downloads/drops4/I20181121-1800/testresults/html/org.eclipse.core.tests.resources_ep410I-unit-win32_win32.win32.x86_64_8.0.html

Bug_006708.testBug fails with:

1.0: org.eclipse.core.internal.resources.ResourceException: A resource exists on disk with a different case: 'C:\jenkins_agent\workspace\ep410I-unit-win32\workarea\I20181121-1800\eclipse-testing\test-eclipse\eclipse\core_resources_sniff_folder\p2'. 

junit.framework.AssertionFailedError: 1.0: org.eclipse.core.internal.resources.ResourceException: A resource exists on disk with a different case: 'C:\jenkins_agent\workspace\ep410I-unit-win32\workarea\I20181121-1800\eclipse-testing\test-eclipse\eclipse\core_resources_sniff_folder\p2'.
at org.eclipse.core.tests.harness.CoreTest.fail(CoreTest.java:72)
at org.eclipse.core.tests.resources.regression.Bug_006708.testBug(Bug_006708.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at junit.framework.TestCase.runTest(TestCase.java:176)
at junit.framework.TestCase.runBare(TestCase.java:141)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
at junit.framework.TestSuite.run(TestSuite.java:247)
at junit.framework.TestSuite.runTest(TestSuite.java:252)
Comment 1 Andrey Loskutov CLA 2018-11-22 10:00:14 EST
The fail seem to appear in 4.10 Windows builds only.

First occurrence I can see is in 4.10 M1 build:
https://download.eclipse.org/eclipse/downloads/drops4/S-4.10M1-201810101800/testresults/html/org.eclipse.core.tests.resources_ep410I-unit-win32_win32.win32.x86_64_8.0.html

The fails from the most recent build is caused by:

Caused by: org.eclipse.core.internal.resources.ResourceException: A resource exists on disk with a different case: 'C:\jenkins_agent\workspace\ep410I-unit-win32\workarea\I20181121-1800\eclipse-testing\test-eclipse\eclipse\core_resources_sniff_folder\p2'.
at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:69)
at org.eclipse.core.internal.resources.Project.create(Project.java:267)
at org.eclipse.core.internal.resources.Project.create(Project.java:251)
at org.eclipse.core.internal.resources.Project.create(Project.java:246)
at org.eclipse.core.tests.resources.regression.Bug_006708.testBug(Bug_006708.java:54)
... 56 more
Caused by: java.lang.Exception: A resource exists on disk with a different case: 'C:\jenkins_agent\workspace\ep410I-unit-win32\workarea\I20181121-1800\eclipse-testing\test-eclipse\eclipse\core_resources_sniff_folder\p2'.
at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
... 61 more

I assume this can be related to the new Windows build machine, but it is hard to say for sure, because 4.10 Windows builds always had lot of errors and I've never tracked them.
Comment 3 Andrey Loskutov CLA 2018-11-23 04:48:48 EST
(In reply to Andrey Loskutov from comment #2)
> I've found first fail in
> https://download.eclipse.org/eclipse/downloads/drops4/I20180924-1800/
> testResults.php
> 
> Build
> https://download.eclipse.org/eclipse/downloads/drops4/I20180910-0310/
> testResults.php does not have it.

The test fails because it detects already existing "p2" project created probably by some previous test. Most likely this is the test WorkspaceTest.testDanglingReferences() added for bug 538541.

This test creates projects but never deletes them. The problem is: the tearDown() of the WorkspaceTest overrides the "usual" teardown of ResourcesTest which deleted entire workspace.

So in the WorkspaceTest we have to *manually* cleanup created resources. I will push a patch in a moment.
Comment 4 Eclipse Genie CLA 2018-11-23 04:51:09 EST
New Gerrit change created: https://git.eclipse.org/r/132957
Comment 6 Eclipse Genie CLA 2018-11-27 11:55:09 EST
New Gerrit change created: https://git.eclipse.org/r/133136
Comment 8 Eclipse Genie CLA 2018-11-30 09:20:03 EST
New Gerrit change created: https://git.eclipse.org/r/133312
Comment 10 Andrey Loskutov CLA 2018-12-05 04:20:55 EST
Last windows build finally had no test failure.