Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8350714

Test vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java fails with --enable-preview

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 25
    • core-svc
    • None

      Test vmTestbase/nsk/jdi/ClassType/invokeMethod/invokemethod009/TestDescription.java
      fails with --enable-preview.

      Sooner or later the preview features are going to be integrated and test start failing.
      The log says wrong exception is thrown:
      22:16:43.765] binder> Launching debugee
      [22:16:43.922] binder> Waiting for VM initialized
      [22:16:43.923] Initial VMStartEvent received: VMStartEvent in thread main
      [22:16:44.307] created breakpoint request nsk.jdi.ClassType.invokeMethod.invokemethod009t:57 (disabled)
      for class nsk.jdi.ClassType.invokeMethod.invokemethod009t (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=741)) ; line=57
      [22:16:44.318]
      Starting potential timed out section:
      waiting 5 minute(s) for JDI Breakpoint event ...

      [22:16:44.321] expected Breakpoint event occured: BreakpointEvent@nsk.jdi.ClassType.invokeMethod.invokemethod009t:57 in thread invokemethod009tThr
      [22:16:44.321]
      Potential timed out section successfully passed

      [22:16:44.528]
      1) Trying to invoke the method "dummyMeth (Lnsk/jdi/ClassType/invokeMethod/invokemethod009tDummyType;)V"
      got from reference type "class nsk.jdi.ClassType.invokeMethod.invokemethod009t (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=741))"
      using the debuggee class "class nsk.jdi.ClassType.invokeMethod.invokemethod009t (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=741))" ...
      [22:16:44.687] # ERROR: TEST FAILED: ClassType.invokeMethod(): caught unexpected java.lang.ClassCastException: class nsk.share.jdi.MockReferenceType cannot be cast to class com.sun.tools.jdi.ReferenceTypeImpl (nsk.share.jdi.MockReferenceType is in unnamed module of loader java.net.URLClassLoader @146044d7; com.sun.tools.jdi.ReferenceTypeImpl is in module jdk.jdi of loader 'app')
      [22:16:44.687] # ERROR: instead of expected ClassNotLoadedException
      [22:16:44.687] # ERROR: when attempted to invoke the method "dummyMeth (Lnsk/jdi/ClassType/invokeMethod/invokemethod009tDummyType;)V"
      [22:16:44.687] # ERROR: got from reference type "class nsk.jdi.ClassType.invokeMethod.invokemethod009t (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=741))"
      [22:16:44.687] # ERROR: using the debuggee class "class nsk.jdi.ClassType.invokeMethod.invokemethod009t (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=741))"
      The following stacktrace is for failure analysis.
      nsk.share.TestFailure: TEST FAILED: ClassType.invokeMethod(): caught unexpected java.lang.ClassCastException: class nsk.share.jdi.MockReferenceType cannot be cast to class com.sun.tools.jdi.ReferenceTypeImpl (nsk.share.jdi.MockReferenceType is in unnamed module of loader java.net.URLClassLoader @146044d7; com.sun.tools.jdi.ReferenceTypeImpl is in module jdk.jdi of loader 'app') instead of expected ClassNotLoadedException
      at nsk.share.Log.logExceptionForFailureAnalysis(Log.java:309)
      at nsk.share.Log.complain(Log.java:280)
      at nsk.jdi.ClassType.invokeMethod.invokemethod009.runIt(invokemethod009.java:174)
      at nsk.jdi.ClassType.invokeMethod.invokemethod009.run(invokemethod009.java:93)
      at nsk.jdi.ClassType.invokeMethod.invokemethod009.main(invokemethod009.java:86)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:565)
      at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:335)
      at java.base/java.lang.Thread.run(Thread.java:1447)
      [22:16:44.691]
      2) Trying to invoke the method "finDummyMeth (Lnsk/jdi/ClassType/invokeMethod/invokemethod009tFinDummyType;)J"
      got from reference type "class nsk.jdi.ClassType.invokeMethod.invokemethod009t (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=741))"
      using the debuggee class "class nsk.jdi.ClassType.invokeMethod.invokemethod009t (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=741))" ...
      [22:16:44.697] # ERROR: TEST FAILED: ClassType.invokeMethod(): caught unexpected java.lang.ClassCastException: class nsk.share.jdi.MockReferenceType cannot be cast to class com.sun.tools.jdi.ReferenceTypeImpl (nsk.share.jdi.MockReferenceType is in unnamed module of loader java.net.URLClassLoader @146044d7; com.sun.tools.jdi.ReferenceTypeImpl is in module jdk.jdi of loader 'app')
      [22:16:44.697] # ERROR: instead of expected ClassNotLoadedException
      [22:16:44.697] # ERROR: when attempted to invoke the method "finDummyMeth (Lnsk/jdi/ClassType/invokeMethod/invokemethod009tFinDummyType;)J"
      [22:16:44.697] # ERROR: got from reference type "class nsk.jdi.ClassType.invokeMethod.invokemethod009t (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=741))"
      [22:16:44.697] # ERROR: using the debuggee class "class nsk.jdi.ClassType.invokeMethod.invokemethod009t (loaded by instance of jdk.internal.loader.ClassLoaders$AppClassLoader(id=741))"
      [22:16:45.67]
      Debuggee process finished with the status: 95

            lmesnik Leonid Mesnik
            lmesnik Leonid Mesnik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: