JDK-8067344 : Adjust java/lang/invoke/LFCaching/LFGarbageCollectedTest.java for recent changes in java.lang.invoke
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Affected Version: 8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-12-12
  • Updated: 2016-05-27
  • Resolved: 2015-01-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
8u60Fixed 9 b47Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Testsuite name: Regression
Test name: java/lang/invoke/LFCaching/LFGarbageCollectedTest.java
JDK tested: JDK 9 b42
OS tested: All
Is it a regression: No
Is it platform specific: No


java.lang.AssertionError: Error: Lambda form is not garbage collected
	at LFGarbageCollectedTest.doTest(LFGarbageCollectedTest.java:81)
	at LambdaFormTestCase$TestRun.doIteration(LambdaFormTestCase.java:139)
	at LambdaFormTestCase$$Lambda$2/21778558.call(Unknown Source)
	at jdk.testlibrary.TimeLimitedRunner.call(TimeLimitedRunner.java:71)
	at LambdaFormTestCase.runTests(LambdaFormTestCase.java:201)
	at LFGarbageCollectedTest.main(LFGarbageCollectedTest.java:105)
	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 com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:745)
Review request: http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-December/030452.html

I can see @ignore was removed from this test in 8066798

Test also fails against 8u40 latest nightly build (contains fix to JDK-8057020), if we remove @ignore tag.

Note, that in JDK 9 b42 repo the test has @ignore jtreg tag, but in nightly builds it has been already removed.

If we run the test with JDK 9 b41 (without LFC feature enabled), we see no errors.

RULE java/lang/invoke/LFCaching/LFGarbageCollectedTest.java Exception java.lang.AssertionError: Error: Lambda form is not garbage collected RULE java/lang/invoke/LFCaching/LFGarbageCollectedTest.java Exception java.lang.Error: ... of ... test cases FAILED! Rerun the test with the same "-Dseed=" option as in the log file!

Looks like fix JDK-8057020 failed.