adoptium / openj9-systemtest

Long running J9 tests
Other
5 stars 37 forks source link

Replace jdk8 OpenJ9 deprecated methods with equivalents #145

Closed pshipton closed 2 years ago

pshipton commented 2 years ago

Otherwise the test code does not compile on jdk19 where the methods are removed. See https://github.com/eclipse-openj9/openj9/pull/15127

See the compile problems in build https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-JDK19/68/

Tested in grinder https://openj9-jenkins.osuosl.org/view/Test/job/Grinder/833

pshipton commented 2 years ago

@Mesbah-Alam pls take a look.

pshipton commented 2 years ago

Note that since standard API are used, the tests are no longer OpenJ9 specific and should run on Hotspot as well.

Mesbah-Alam commented 2 years ago

Thanks for these changes @pshipton !

Looks like the grinder is still reproducing the original issue, e.g. https://openj9-jenkins.osuosl.org/job/Grinder_testList_0/117/consoleFull:

12:15:17  CL2 j> 2022/05/31 02:15:16.029 Connection established!
12:15:17  CL2 stderr javax.management.AttributeNotFoundException: No such attribute: ProcessVirtualMemorySize
12:15:17  CL2 stderr    at java.management/com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:81)
12:15:17  CL2 stderr    at java.management/com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:206)
12:15:17  CL2 stderr    at java.management/javax.management.StandardMBean.getAttribute(StandardMBean.java:372)
12:15:17  CL2 stderr    at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:641)
12:15:17  CL2 stderr    at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:679)
12:15:17  CL2 stderr    at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1449)
12:15:17  CL2 stderr    at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1310)
12:15:17  CL2 stderr    at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1405)
12:15:17  CL2 stderr    at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:639)
12:15:17  CL2 stderr    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
12:15:17  CL2 stderr    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
12:15:17  CL2 stderr    at java.base/java.security.AccessController.doPrivileged(AccessController.java:784)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:598)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:844)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:721)
12:15:17  CL2 stderr    at java.base/java.security.AccessController.doPrivileged(AccessController.java:718)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:720)
12:15:17  CL2 stderr    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
12:15:17  CL2 stderr    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
12:15:17  CL2 stderr    at java.base/java.lang.Thread.run(Thread.java:858)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:304)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:280)
12:15:17  CL2 stderr    at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:166)
12:15:17  CL2 stderr    at jdk.remoteref/jdk.jmx.remote.internal.rmi.PRef.invoke(Unknown Source)
12:15:17  CL2 stderr    at java.management.rmi/javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(RMIConnectionImpl_Stub.java:279)
12:15:17  CL2 stderr    at java.management.rmi/javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:902)
12:15:17  CL2 stderr    at net.openj9.test.extensions.OperatingSystemExtensionCommand.execute(OperatingSystemExtensionCommand.java:108)
12:15:17  CL2 stderr    at net.openj9.test.jlm.resources.VMData.invokeIBMOSBeanTest(VMData.java:187)
12:15:17  CL2 stderr    at net.openj9.test.jlm.resources.EnvironmentData.writeData(EnvironmentData.java:100)
12:15:17  CL2 stderr    at net.openj9.test.jlm.remote.ClassProfiler.getStatsViaServer(ClassProfiler.java:171)
12:15:17  CL2 stderr    at net.openj9.test.jlm.remote.ClassProfiler.main(ClassProfiler.java:99)
12:15:17  CL2 stderr Exception in thread "main" java.lang.AssertionError: Attribute does not exist on the MBean
pshipton commented 2 years ago

That's a new problem, but related. I'll fix and re-run.

pshipton commented 2 years ago

I just re-ran the failed tests, which are passing now. https://openj9-jenkins.osuosl.org/view/Test/job/Grinder/841

Mesbah-Alam commented 2 years ago

LGTM! (I don't have the right to approve or merge this PR).