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

[CRaC] CracTest mishandles NoSuchMethodException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-crac
    • repo-crac
    • core-libs
    • None

      If a test based on `jdk.test.lib.crac.CracTest` throws `NoSuchMethodException` the following error will be printed instead of the error itself and mislead the developer:
      ```
      java.lang.RuntimeException: Test class <test class name> is expected to have a public no-arg constructor
              at jdk.test.lib.Asserts.fail(Asserts.java:715)
              at jdk.test.lib.crac.CracTest.run(CracTest.java:162)
              at jdk.test.lib.crac.CracTest.main(CracTest.java:90)
              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)
      ```

            tpushkin Timofei Pushkin
            tpushkin Timofei Pushkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: