Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-28860

Enhance Scripts tests to ignore warning about JDK's sun.misc.Unsafe usage on JDK24+

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Test Suite
    • False
    • None
    • False

      AppClientScriptTestCase is failing on JDK24 because processed console output contains JDK warning about deprecated sun.misc.Unsafe methods usage. Test must be fixed to don't fail if such WARNING is being printed.

      FAILURE DESCRIPTION:

      [INFO] Running org.wildfly.test.scripts.AppClientScriptTestCase
      WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
      WARNING: sun.misc.Unsafe::objectFieldOffset has been called by org.wildfly.security.manager.WildFlySecurityManager (file:/home/opalka/.m2/repository/org/wildfly/security/wildfly-elytron-security-manager/2.6.0.Final/wildfly-elytron-security-manager-2.6.0.Final.jar)
      WARNING: Please consider reporting this to the maintainers of class org.wildfly.security.manager.WildFlySecurityManager
      WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
      [INFO] Listening for transport dt_socket at address: 5005
      [ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 4, Time elapsed: 34.03 s <<< FAILURE! – in org.wildfly.test.scripts.AppClientScriptTestCase
      [ERROR] org.wildfly.test.scripts.AppClientScriptTestCase.testBashScript – Time elapsed: 33.69 s <<< FAILURE!
      java.lang.AssertionError:
      Expected 2 lines.
      Command Executed:
      /home/opalka/git/redhat/PUBLIC/wildfly/testsuite/scripts/target/wildfly/bin/appclient.sh -v
      Environment:
      Output:
      19:38:37,992 INFO [org.jboss.modules] (main) JBoss Modules version 2.1.6.Final
      WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
      WARNING: sun.misc.Unsafe::objectFieldOffset has been called by org.wildfly.security.manager.WildFlySecurityManager (jar:file:/home/opalka/.m2/repository/org/wildfly/security/wildfly-elytron-security-manager/2.6.0.Final/wildfly-elytron-security-manager-2.6.0.Final.jar!/)
      WARNING: Please consider reporting this to the maintainers of class org.wildfly.security.manager.WildFlySecurityManager
      WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
      WildFly 36.0.0.Beta1-SNAPSHOT (WildFly Core 28.0.0.Beta1-SNAPSHOT)
      expected:<2> but was:<6>
      at org.junit.Assert.fail(Assert.java:89)
      at org.junit.Assert.failNotEquals(Assert.java:835)
      at org.junit.Assert.assertEquals(Assert.java:647)
      at org.wildfly.test.scripts.AppClientScriptTestCase.testScript(AppClientScriptTestCase.java:56)
      at org.wildfly.test.scripts.AppClientScriptTestCase.testScript(AppClientScriptTestCase.java:28)
      at org.wildfly.test.scripts.ScriptTestCase.executeTests(ScriptTestCase.java:148)
      at org.wildfly.test.scripts.ScriptTestCase.testBashScript(ScriptTestCase.java:88)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.base/java.lang.reflect.Method.invoke(Method.java:565)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
      at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
      at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)

      [INFO]
      [INFO] Results:
      [INFO]
      [ERROR] Failures:
      [ERROR] AppClientScriptTestCase>ScriptTestCase.testBashScript:88->ScriptTestCase.executeTests:148->testScript:28->testScript:56 Expected 2 lines.
      Command Executed:
      /home/opalka/git/redhat/PUBLIC/wildfly/testsuite/scripts/target/wildfly/bin/appclient.sh -v
      Environment:
      Output:
      19:38:37,992 INFO [org.jboss.modules] (main) JBoss Modules version 2.1.6.Final
      WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
      WARNING: sun.misc.Unsafe::objectFieldOffset has been called by org.wildfly.security.manager.WildFlySecurityManager (jar:file:/home/opalka/.m2/repository/org/wildfly/security/wildfly-elytron-security-manager/2.6.0.Final/wildfly-elytron-security-manager-2.6.0.Final.jar!/)
      WARNING: Please consider reporting this to the maintainers of class org.wildfly.security.manager.WildFlySecurityManager
      WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
      WildFly 36.0.0.Beta1-SNAPSHOT (WildFly Core 28.0.0.Beta1-SNAPSHOT)
      expected:<2> but was:<6>
      [INFO]
      [ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 4

              ropalka Richard Opalka
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: