Community
Participate
Working Groups
Build ID: 3.2 Steps To Reproduce: 1. build the latest Harmony jre 2. dowload EUT runniing script from jira-2038 3. update eut.properties: set test.jre.home= to Harmony jre home 4. run "ant -Dtests=jdtcorecompiler" More information: Some jdt tests fail on Harmony with "junit.framework.AssertionFailedError: No targetException null". AFAIU the cause of the failures is in the org.eclipse.jdt.core.tests.runtime.LocalVMLauncher.execCommandLine() method which creates a new instance of JVM but does not care if the VM has already started. Please see the following JIRA issue for more details: https://issues.apache.org/jira/browse/HARMONY-3375
Could you please provide details to do steps 1 and 2? Thanks.
1. It's not necessary to build Harmony from svn, you could download a binary distribution from the following location - http://harmony.apache.org/downloads.html 2. You can download the script from here https://issues.apache.org/jira/browse/HARMONY-2038, but you also could omit this step.
The JIRA mentions inserting a 5s pause... this feels like a hack. Shouldn't it wait for real on the VM ?
Indeed LocalVMLauncher.execCommandLine() doesn't wait for the VM to complete its startup (there is no API to do so). However EvaluationSetup.setUp() will try to connect to this VM during 10 seconds (see this.target.connect("localhost", evalPort, 10000);) So it looks like no Socket could be bound to the launched VM 10 seconds after it was launched. Does the Harmony VM take that long to launch ? If so, the fix would be to increase the timeout during the connection.
Actually the tests pass on systems with a big amount of RAM, but on my laptop with 1Gb the tests fail. I think this happens because an instance of Harmony VM "eats" ~300Mb of memory. Thus, to allocate additional 300Mb for a new instance of VM started from the tests, it's required too move some amount of data from RAM to swap that takes too much time.
Created attachment 68092 [details] Possible fix This fix consists in increasing the timeout to 30 seconds.
Could you please try the attached patch and let me know if this fixes the problem ?
It works for me. Thanks.
Patch released for 3.3RC2 in HEAD.
Verified for 3.3 RC2 by user