[jboss-jira] [JBoss JIRA] (WFCORE-5023) A few tests don't work using IBM JDK because of mock-server 5.9.0

Ricardo Martin Camarero (Jira) issues at jboss.org
Fri Jun 26 03:36:22 EDT 2020


    [ https://issues.redhat.com/browse/WFCORE-5023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14177542#comment-14177542 ] 

Ricardo Martin Camarero commented on WFCORE-5023:
-------------------------------------------------

The mockserver seems to work this way:

* Version 5.8.1 seems to use bouncycastle for all SSL configuration.
* 5.9.0 and 5.10.0 seems to use internal openjdk for everything (and makes IBM jdk fail).
* In the future it seems that bouncycastle is going to be optional and it can be configured to be used instead of the internal openjdk (this [commit|https://github.com/mock-server/mockserver/commit/34e792f47c23bf0e96e4a29ee331aabdaf7bce02], but it's still WIP).

For the moment the downgrade is needed and we'll upgrade it when the new version is ready and able to switch between both SSL implementations. Let's see if the downgrade does not affect any other test.

> A few tests don't work using IBM JDK because of mock-server 5.9.0
> -----------------------------------------------------------------
>
>                 Key: WFCORE-5023
>                 URL: https://issues.redhat.com/browse/WFCORE-5023
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Test Suite
>    Affects Versions: 13.0.0.Beta1
>            Reporter: Ricardo Martin Camarero
>            Assignee: Ricardo Martin Camarero
>            Priority: Major
>
> After JIRA WFCORE-4850 the mock-server 5.9.0 does not work with IBM JDK which makes a few tests fail with the following error:
> {code:bash}
> cd ./testsuite/standalone/
> export JAVA_HOME=/home/rmartinc/apps/ibm-java-x86_64-80/
> mvn clean test -Dtest=org.jboss.as.test.integration.management.cli.SecurityCommandsTestCase
> ...
> [INFO] -------------------------------------------------------
> [INFO]  T E S T S
> [INFO] -------------------------------------------------------
> [INFO] Running org.jboss.as.test.integration.management.cli.SecurityCommandsTestCase
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.005 s <<< FAILURE! - in org.jboss.as.test.integration.management.cli.SecurityCommandsTestCase
> [ERROR] org.jboss.as.test.integration.management.cli.SecurityCommandsTestCase  Time elapsed: 0.003 s  <<< ERROR!
> java.lang.NoClassDefFoundError: sun.security.x509.GeneralNameInterface
> 	at org.mockserver.socket.tls.jdk.JDKKeyAndCertificateFactory.<init>(JDKKeyAndCertificateFactory.java:36)
> 	at org.mockserver.socket.tls.NettySslContextFactory.<init>(NettySslContextFactory.java:37)
> 	at org.mockserver.client.MockServerClient.<init>(MockServerClient.java:57)
> 	at org.mockserver.integration.ClientAndServer.<init>(ClientAndServer.java:19)
> 	at org.jboss.as.test.integration.management.cli.SecurityCommandsTestCase.setup(SecurityCommandsTestCase.java:358)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
> 	at java.lang.reflect.Method.invoke(Method.java:508)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	at org.wildfly.core.testrunner.WildflyTestRunner.run(WildflyTestRunner.java:157)
> 	at org.junit.runners.Suite.runChild(Suite.java:128)
> 	at org.junit.runners.Suite.runChild(Suite.java:27)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	at org.apache.maven.surefire.junitcore.JUnitCore.run(JUnitCore.java:55)
> 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createRequestAndRun(JUnitCoreWrapper.java:137)
> 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:107)
> 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:83)
> 	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:75)
> 	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:158)
> 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
> 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
> 	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
> Caused by: java.lang.ClassNotFoundException: sun.security.x509.GeneralNameInterface
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:610)
> 	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:944)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:889)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:872)
> 	... 36 more
> {code}
> The tests that don't work are the following three classes:
> * CertificateAuthoritiesTestCase.java (elytron)
> * KeyStoresTestCase.java (elytron)
> * SecurityCommandsTestCase.java (testsuite/standalone)
> This is explained in the mock-server [issue 750|https://github.com/mock-server/mockserver/issues/750]. For the moment the only solution is doing a downgrade to 5.8.1. Although it is expected to be fixed soon in the mock-server (maybe in the next version 5.10.1 or 5.11.0).



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list