Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 543324

Summary: [11] 3 CompilerToolJava9Tests.test*LocationForModule* tests fail
Product: [Eclipse Project] JDT Reporter: Andrey Loskutov <loskutov>
Component: CoreAssignee: Andrey Loskutov <loskutov>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana
Version: 4.11   
Target Milestone: 4.11 M3   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/134863
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=afbdd69b75f4a965f05e986955f7dc51cce4230f
https://git.eclipse.org/r/134988
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=cec4302b5cafc054b1f595979702a95b0b5af1c5
Whiteboard:

Description Andrey Loskutov CLA 2019-01-09 16:03:17 EST
After fixing bug 543184 we see that 3 from 18 not executed tests fail now with similar stacks on Java 11:

https://download.eclipse.org/eclipse/downloads/drops4/I20190109-0655/testresults/html/org.eclipse.jdt.compiler.tool.tests_ep411I-unit-cen64-gtk3-java11_linux.gtk.x86_64_11.html

testGetLocationForModule3	Failure	Eclipse Compiler:module path location should not be null 

junit.framework.AssertionFailedError: Eclipse Compiler:module path location should not be null 
at junit.framework.Assert.fail(Assert.java:57) 
at junit.framework.Assert.assertTrue(Assert.java:22) 
at junit.framework.Assert.assertNotNull(Assert.java:256) 
at junit.framework.TestCase.assertNotNull(TestCase.java:426) 
at org.eclipse.jdt.compiler.tool.tests.CompilerToolJava9Tests.testGetLocationForModule3(CompilerToolJava9Tests.java:196)

testClassOutputLocationForModule_1	Error	N/A 

java.lang.NullPointerException 
at org.eclipse.jdt.internal.compiler.tool.EclipseFileManager.getLocationForModule(EclipseFileManager.java:1425) 
at org.eclipse.jdt.compiler.tool.tests.CompilerToolJava9Tests.testClassOutputLocationForModule_1(CompilerToolJava9Tests.java:515)


testGetLocationForModule2	Failure	Eclipse Compiler:module path location should not be null 

junit.framework.AssertionFailedError: Eclipse Compiler:module path location should not be null 
at junit.framework.Assert.fail(Assert.java:57) 
at junit.framework.Assert.assertTrue(Assert.java:22) 
at junit.framework.Assert.assertNotNull(Assert.java:256) 
at junit.framework.TestCase.assertNotNull(TestCase.java:426) 
at org.eclipse.jdt.compiler.tool.tests.CompilerToolJava9Tests.testGetLocationForModule2(CompilerToolJava9Tests.java:177)
Comment 1 Andrey Loskutov CLA 2019-01-09 16:08:31 EST
The tests do *not* fail locally in the IDE (at least not on my Windows notebook).
Comment 2 Eclipse Genie CLA 2019-01-09 17:17:16 EST
New Gerrit change created: https://git.eclipse.org/r/134863
Comment 4 Andrey Loskutov CLA 2019-01-12 03:35:29 EST
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created: https://git.eclipse.org/r/134863

File should exist: /home/cbi/genie.releng/workspace/ep411I-unit-cen64-gtk3-java11/workarea/I20190111-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.jdt.compiler.tool.tests_1.2.500.v20190109-2229/resources/module_locations/source/SimpleModules/module.one/module-info.java 

junit.framework.AssertionFailedError: File should exist: /home/cbi/genie.releng/workspace/ep411I-unit-cen64-gtk3-java11/workarea/I20190111-1800/eclipse-testing/test-eclipse/eclipse/plugins/org.eclipse.jdt.compiler.tool.tests_1.2.500.v20190109-2229/resources/module_locations/source/SimpleModules/module.one/module-info.java 
at junit.framework.Assert.fail(Assert.java:57) 
at junit.framework.Assert.assertTrue(Assert.java:22) 
at junit.framework.TestCase.assertTrue(TestCase.java:192) 
at org.eclipse.jdt.compiler.tool.tests.CompilerToolJava9Tests.initializeLocations(CompilerToolJava9Tests.java:134) 
at org.eclipse.jdt.compiler.tool.tests.CompilerToolJava9Tests.setUp(CompilerToolJava9Tests.java:100) 

Cool. On java 11 we have now 18 tests failing (== all tests in CompilerToolJava9Tests), because I've added an assert in the setup that the 
resources/module_locations/source/SimpleModules/module.one/module-info.java should exist in the bundle /resources directory - this was the problem with the three failing tests before.

Means, for some reasons we can't read files under Platform.getBundle("org.eclipse.jdt.compiler.tool.tests").getEntry("/")?

I'm looking into it.
Comment 5 Eclipse Genie CLA 2019-01-12 03:52:42 EST
New Gerrit change created: https://git.eclipse.org/r/134988
Comment 8 Jay Arthanareeswaran CLA 2019-01-16 00:14:16 EST
(In reply to Andrey Loskutov from comment #7)
> No fails in
> https://download.eclipse.org/eclipse/downloads/drops4/I20190112-1800/testResults.php
> 

Verified for 4.11 M3 with build I20190112-1800.

Thanks Andrey!