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

Bug 567682

Summary: [tests] Java 15 based LeakTestCase failing on I-builds
Product: [Eclipse Project] JDT Reporter: Carsten Hammer <carsten.hammer>
Component: UIAssignee: Noopur Gupta <noopur_gupta>
Status: VERIFIED FIXED QA Contact: Kalyan Prasad Tatavarthi <kalyan_prasad>
Severity: normal    
Priority: P3 CC: akurtako, akurtakov, kalyan_prasad, mistria, noopur_gupta, rgrunber, sravankumarl
Version: 4.18   
Target Milestone: 4.18 M3   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/170457
https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/170762
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=e53366492e039bee555632159876bdc59b51842a
https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/170812
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=cfaf35630d32d457e9dae29765bf43f46b9eedfc
https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/170981
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=edbced81df31299896d62ae86e851a7e7e559440
Whiteboard: 4.18 M2

Description Carsten Hammer CLA 2020-10-07 14:00:09 EDT
It looks like it is missing a module java.base/jdk.internal.icu.text on java 15, maybe since the move away from the extra unicode package.

java.lang.RuntimeException: JVM settings `--add-modules ALL-SYSTEM --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/jdk.internal.math=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED` are probably missing.
at org.eclipse.jdt.ui.leaktest.reftracker.ReferenceTracker.setAccessible(ReferenceTracker.java:113)
at org.eclipse.jdt.ui.leaktest.reftracker.ReferenceTracker.followFieldReference(ReferenceTracker.java:70)
at org.eclipse.jdt.ui.leaktest.reftracker.ReferenceTracker.visit(ReferenceTracker.java:151)
at org.eclipse.jdt.ui.leaktest.reftracker.ReferenceTracker.start(ReferenceTracker.java:175)
at org.eclipse.jdt.ui.leaktest.LeakTestCase.collect(LeakTestCase.java:58)
at org.eclipse.jdt.ui.leaktest.LeakTestCase.assertInstanceCount(LeakTestCase.java:123)
at org.eclipse.jdt.ui.tests.search.SearchLeakTest.testSearchResultEditorClose(SearchLeakTest.java:72)
at org.eclipse.jdt.ui.tests.search.SearchLeakTestWrapper.testSearchResultEditorClose(SearchLeakTestWrapper.java:62)
Comment 1 Noopur Gupta CLA 2020-10-08 03:18:17 EDT
Kalyan was looking into these failures. 

Kalyan, any progress here?

Please check regarding java.base/jdk.internal.icu.text module as suggested by Carsten.
Comment 2 Eclipse Genie CLA 2020-10-14 06:10:50 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/170762
Comment 3 Noopur Gupta CLA 2020-10-14 06:12:37 EDT
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created:
> https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/170762

It needs two new entries with Java 15:

jdk.internal.icu.impl
jdk.internal.icu.text
Comment 5 Noopur Gupta CLA 2020-10-14 06:16:47 EDT
To be verified in the next I-build.
Comment 6 Kalyan Prasad Tatavarthi CLA 2020-10-15 02:14:41 EDT
Reopening as tests failed again in the build I20201014-1800
Comment 7 Noopur Gupta CLA 2020-10-15 02:58:30 EDT
Can others here confirm if the tests pass locally on their systems after adding the following to VM arguments in the test launch configuration?

--add-modules ALL-SYSTEM --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED --add-opens jdk.localedata/sun.util.resources.provider=ALL-UNNAMED --add-opens java.base/jdk.internal.module=ALL-UNNAMED --add-opens java.base/java.lang.module=ALL-UNNAMED --add-opens java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/jdk.internal.math=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.impl=ALL-UNNAMED --add-opens java.base/jdk.internal.icu.text=ALL-UNNAMED
Comment 8 Noopur Gupta CLA 2020-10-15 03:00:41 EDT
(In reply to Noopur Gupta from comment #7)
> Can others here confirm if the tests pass locally on their systems after
> adding the following to VM arguments in the test launch configuration?
> 
> --add-modules ALL-SYSTEM --add-opens
> java.base/jdk.internal.loader=ALL-UNNAMED --add-opens
> jdk.localedata/sun.util.resources.cldr.provider=ALL-UNNAMED --add-opens
> jdk.localedata/sun.util.resources.provider=ALL-UNNAMED --add-opens
> java.base/jdk.internal.module=ALL-UNNAMED --add-opens
> java.base/java.lang.module=ALL-UNNAMED --add-opens
> java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens
> java.base/jdk.internal.ref=ALL-UNNAMED --add-opens
> java.base/jdk.internal.math=ALL-UNNAMED --add-opens
> java.base/jdk.internal.misc=ALL-UNNAMED --add-opens
> java.base/jdk.internal.icu.impl=ALL-UNNAMED --add-opens
> java.base/jdk.internal.icu.text=ALL-UNNAMED

Please run the tests with Java 15 on "Main" tab of the launch config.
Comment 9 Noopur Gupta CLA 2020-10-15 03:07:51 EDT
Since these tests pass locally for me now, adding Alex, Mickael and Roland in cc (ref. bug 565411) to check if they have any idea why these are still failing on the build machine.
Comment 10 Eclipse Genie CLA 2020-10-15 04:03:44 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/170812
Comment 12 Noopur Gupta CLA 2020-10-15 04:07:48 EDT
Checked with Sravan: for I-builds, test.xml needs to be updated and for Gerrit builds, pom.xml update is required.

Updated test.xml. To be verified with the next I-build.
Comment 13 Noopur Gupta CLA 2020-10-19 03:08:30 EDT
Verified in I20201018-1800 test results.
Comment 14 Alexander Kurtakov CLA 2020-10-20 02:00:47 EDT
This failed running tests with: 
"You must nest a condition into <condition> "
visible in https://download.eclipse.org/eclipse/downloads/drops4/I20201019-1800/testresults/consolelogs/ep418I-unit-cen64-gtk3-java11_linux.gtk.x86_64_11_consolelog.txt
It seems to be the removed "<javaversion atleast="9"/>" in <javaversion atleast="9"/>

https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=cfaf35630d32d457e9dae29765bf43f46b9eedfc
Comment 15 Eclipse Genie CLA 2020-10-20 02:09:27 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/170981
Comment 17 Noopur Gupta CLA 2020-10-20 02:17:31 EDT
Thanks, Alex. It was removed as we don't run tests below 9 now. But it seems that the condition is required. I have released your patch.
Comment 18 Noopur Gupta CLA 2020-11-17 00:02:01 EST
Verified in I20201116-0600.