RFR: JMC-6118 Java Mission Control tests fail on OpenJDK8

Guru guru.hb at oracle.com
Tue Nov 6 22:21:11 UTC 2018


I did a Quick try with "https://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#useJDK <https://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#useJDK>” 
1. Had a local ~/.m2/toolchains.xml 
 <toolchain>
   ..
    <provides>
      <version>11</version>
      <id>JavaSE-11</id>
      <vendor>Oracle</vendor>
    </provides>
    <configuration>
      <jdkHome>PATH_TO_JDK11</jdkHome>
    </configuration>
  </toolchain>
2. Updated “Application/uitest/pom.xml” with  <useJDK>JavaSE-11</useJDK> 

3. Tried Mocking with “JavaSE-10” even though I had pointed the “jdkHome” to JDK 11 , and it failed with 
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:1.2.0:test (default-test) on project org.openjdk.jmc.browser.uitest: Unable to parse configuration of mojo org.eclipse.tycho:tycho-surefire-plugin:1.2.0:test: Cannot convert 'JavaSE-10' to Enum: No enum constant org.eclipse.tycho.core.maven.ToolchainProvider.JDKUsage.JavaSE-10 -> [Help 1]
[ERROR]

Let’s not explore much with ‘useJDK’ until tycho plugin is fully capable with JDK 11.

With this "JavaSE-11” wasn’t recognised by tycho ! (https://bugs.eclipse.org/bugs/show_bug.cgi?id=532302 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=532302> , https://stackoverflow.com/questions/52607910/eclipse-tycho-java-11-unknown-osgi-execution-environment-javase-11 <https://stackoverflow.com/questions/52607910/eclipse-tycho-java-11-unknown-osgi-execution-environment-javase-11>) 
	"Caused by: org.eclipse.tycho.core.ee.UnknownEnvironmentException: Unknown OSGi execution environment: 'JavaSE-11’”
Have to wait until Eclipse 4.10 and with tycho 1.3.0+ 

I will raise a JBS with this details (tycho not recognising JavaSE-11) and will target the fix when we use Eclipse 4.10 and above. 

Until then Please use JMC-6194 for further review and commit. 

Thanks,
Guru
> On 07-Nov-2018, at 2:40 AM, Guru <guru.hb at oracle.com> wrote:
> 
> Hi Josh,
> 
> Changes looks good to me, But Please Note, We can’t have multiple commit on a single JBS ID. I have raised https://bugs.openjdk.java.net/browse/JMC-6194 <https://bugs.openjdk.java.net/browse/JMC-6194> as a follow on for this one.
> 
> Do update the description of JMC-6194 (if its needs correction). 
> 
> To make our this uiTest succeeded (along with our compilation) Can we Introduce JDK11_HOME or JDK_HOME which points to OpenJDK_11 and then while running uiTest we use the JDK_HOME in the tycho-surfire (I have not evaluated , its just a thought). 
> OpenJFX had this similar idea of defining JAVA_HOME for running tests and JDK_HOME for Compiling (it’s based on gradle) and we can try for our JMC (with maven). 
> 
> Thanks,
> Guru
>> On 06-Nov-2018, at 12:58 AM, Joshua Matsuoka <jmatsuok at redhat.com> wrote:
>> 
>> Hi,
>> 
>> The following patch adds four additional tests to the list of excluded
>> tests on OpenJDK8:
>> 
>> ControlRecordingsTest - Attempts to perform various operations on a
>> recording from the JVM Browser, fails since we don't have flight recorder
>> functionality in OpenJDK8
>> 
>> JfrWizardTest - Attempts to test various options in the JFR Recording
>> wizard. The wizard is started from the JVM Browser, so it fails for the
>> same reasons as the previous test.
>> 
>> TemplateManagerTest - Requires the JVM Browser to have JFR functionality,
>> same as above.
>> 
>> DiagnosticCommandsTabTest - Expects JFR diagnostic commands to be present
>> in the list of options. They aren't there for OpenJDK8.
>> 
>> This allows mvn clean verify -P uitests to be run successfully on OpenJDK8.
>> 
>> http://cr.openjdk.java.net/~jmatsuoka/JMC-6118/webrev.01/
>> 
>> Thoughts?
>> 
>> Cheers,
>> 
>> - Josh
> 



More information about the jmc-dev mailing list