JDK-8175177 : org/omg/CORBA/OrbPropertiesTest.java changes JDK under test
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:orb
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2017-02-17
  • Updated: 2018-03-20
  • Resolved: 2018-03-20
Related Reports
Relates :  
Relates :  
Description
org/omg/CORBA/OrbPropertiesTest.java was introduced in JDK-8049375, this test changes JDK under testing:

66:       String orbPropertiesFile = System.getProperty("java.home", ".") + "/conf/orb.properties";
...
70:        try (PrintWriter hfPWriter = new PrintWriter(new BufferedWriter(
71:                new FileWriter(orbPropertiesFile, false)))) {
72:            hfPWriter.println(orbPropertiesMappings);
73:        } catch (IOException ioEx) {

After this test run, file orb.properties is left in the jdk-9/conf/orb.properties 

$ cat jdk-9/conf/orb.properties 
org.omg.CORBA.ORBClass TestOrbImpl
org.omg.CORBA.ORBSingletonClass TestSingletonOrbImpl

This changes JDK behaviour and many corba tests run after this test will then fail.
Comments
The CORBA and Java EE modules have been removed from JDK 11, therefore there are no plans to address this issue.
20-03-2018

Note that org/omg/CORBA/OrbPropertiesTest.java itself doesn���t fail, but as it writes conf/orb.properties to the JDK under test, and that file be left over, test that runs after OrbPropertiesTest and against the same JDK then fail. This always reproducible by: 1) run OrbPropertiesTest 2) run other corba related test, say, com/sun/corba/5036554/TestCorbaBug.sh against the same test jdk. bash-3.2$ ls $TEST_JAVA_HOME/conf/orb.properties ls: dev/build/macosx-x86_64-normal-server-release/images/jdk/conf/orb.properties: No such file or directory bash-3.2$ $JT_HOME/bin/jtreg -agentvm -nr -jdk:$TEST_JAVA_HOME dev/jdk/test/org/omg/CORBA/OrbPropertiesTest.java Test results: passed: 1 bash-3.2$ ls $TEST_JAVA_HOME/conf/orb.properties dev/build/macosx-x86_64-normal-server-release/images/jdk/conf/orb.properties (Note that conf/orb.properties be left over) bash-3.2$ $JT_HOME/bin/jtreg -agentvm -nr -jdk:$TEST_JAVA_HOME dev/jdk/test/com/sun/corba/5036554/TestCorbaBug.sh Test results: failed: 1 ----------System.out:(25/1611)---------- org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation TestOrbImpl vmcid: 0x0 minor code: 0 completed: No at java.corba@9-internal/org.omg.CORBA.ORB.create_impl(ORB.java:378) at java.corba@9-internal/org.omg.CORBA.ORB.init(ORB.java:422) at bug.JavaBug.main(JavaBug.java:29) Caused by: java.lang.ClassNotFoundException: TestOrbImpl at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:533) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:186) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:476) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at java.corba@9-internal/org.omg.CORBA.ORB.create_impl(ORB.java:375) ... 2 more Invalid output
22-02-2017

Note that test has been problem listed (JDK-8175240), please remember to remove it from ProblemList.txt with this (JDK-8175177) fix.
20-02-2017

Though this is test issue, this needs to be fixed the sooner the better as it impacts many other tests.
17-02-2017