Openliberty arquillian 测试

Posted

技术标签:

【中文标题】Openliberty arquillian 测试【英文标题】:Openliberty arquillian testing 【发布时间】:2022-01-02 20:50:45 【问题描述】:

我在使用 arquillian 针对 openliberty 运行集成测试时遇到了问题。基本上它在部署上超时。显然你可以设置appDeployTimeout 我已经完成了。但是它似乎没有被加载,因为它同时超时。

我错过了什么吗?我可以在server.xml 中设置吗?

编辑 1:记录:

[INFO] Running za.co.nb.offermanagement.apis.resources.RecalculateOfferIT
Picked up JAVA_TOOL_OPTIONS: -Dcom.ibm.ws.logging.console.log.level=INFO -Dsystem.context.root=/weboffer
Launching defaultServer (Open Liberty 21.0.0.11/wlp-1.0.58.cl211120211019-1900) on OpenJDK 64-Bit Server VM, version 1.8.0_312-b07 (en_ZA)
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: C:\Users\cc327150\dev\projects\nedbank\bpmexjee-offermanagement\WebOfferManagement\target\liberty\wlp\usr\servers\defaultServer\configDropins\overrides\liberty-plugin-variable-config.xml
[INFO    ] CWWKE0002I: The kernel started after 3.386 seconds
[INFO    ] CWWKF0007I: Feature update started.
[INFO    ] Aries Blueprint packages not available. So namespaces will not be registered
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT   ] CWWKI0001I: The CORBA name server is now available at corbaloc:iiop:localhost:2809/NameService.
[WARNING ] CWWKZ0014W: The application weboffer could not be started as it could not be found at location weboffer.war.
[INFO    ] CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host *  (IPv6) port 9080.
[AUDIT   ] CWWKF0012I: The server installed the following features: [ejb-3.2, ejbHome-3.2, ejbLite-3.2, ejbPersistentTimer-3.2, ejbRemote-3.2, jaxrs-2.1, jaxrsClient-2.1, jca-1.7, jdbc-4.1, jndi-1.0, jsonp-1.1, localConnector-1.0, mdb-3.2, servlet-4.0].
[INFO    ] CWWKF0008I: Feature update completed in 8.636 seconds.
[AUDIT   ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 12.014 seconds.
[ERROR   ] CWWKZ0013E: It is not possible to start two applications called weboffer.
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: Listing all apps...
[INFO    ] SESN8501I: The session manager did not find a persistent storage location; HttpSession objects will be stored in the local application server's memory.
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: Size of results: 43
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=Metaspace
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=PS Old Gen
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=Runtime
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:service=permissionadmin,version=1.2,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.websphere.config.mbeans.FeatureListMBean
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=GarbageCollector,name=PS Scavenge
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=Threading
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.websphere.runtime.update.RuntimeUpdateNotificationMBean
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=PS Eden Space
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.nio:type=BufferPool,name=mapped
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: jdk.management.jfr:type=FlightRecorder
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.ws.jmx.mbeans.sessionManagerMBean
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=Compressed Class Space
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.ws.config.serverSchemaGenerator
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=kernel,name=ServerInfo
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=PS Survivor Space
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.util.logging:type=Logging
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.compendium:service=cm,version=1.3,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:type=bundleState,version=1.7,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:type=packageState,version=1.5,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=Compilation
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.ws.jmx.mbeans.generatePluginConfig
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=OperatingSystem
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=PluginUtility,name=PluginConfigRequester
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: JMImplementation:type=MBeanServerDelegate
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryManager,name=Metaspace Manager
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=channelfw,type=endpoint,name=defaultHttpEndpoint
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=ClassLoading
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: com.sun.management:type=HotSpotDiagnostic
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.websphere.config.mbeans.ServerXMLConfigurationMBean
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryManager,name=CodeCacheManager
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=ejbPersistentTimer,type=EJBPersistentTimerService,name=EJBPersistentTimerService
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=Code Cache
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:type=framework,version=1.7,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=persistence,type=DDLGenerationMBean,name=DDLGenerationMBean
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.nio:type=BufferPool,name=direct
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:type=serviceState,version=1.7,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:service=com.ibm.websphere.application.ApplicationMBean,name=weboffer
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=kernel,name=ServerEndpointControl
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=GarbageCollector,name=PS MarkSweep
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: com.sun.management:type=DiagnosticCommand
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:service=com.ibm.ws.kernel.filemonitor.FileNotificationMBean
Nov 24, 2021 2:30:17 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=Memory
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: Listing all apps...
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: Size of results: 43
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=Metaspace
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=PS Old Gen
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=Runtime
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:service=permissionadmin,version=1.2,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.websphere.config.mbeans.FeatureListMBean
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=GarbageCollector,name=PS Scavenge
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=Threading
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.websphere.runtime.update.RuntimeUpdateNotificationMBean
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=PS Eden Space
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.nio:type=BufferPool,name=mapped
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: jdk.management.jfr:type=FlightRecorder
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.ws.jmx.mbeans.sessionManagerMBean
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=Compressed Class Space
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.ws.config.serverSchemaGenerator
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=kernel,name=ServerInfo
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=PS Survivor Space
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.util.logging:type=Logging
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.compendium:service=cm,version=1.3,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:type=bundleState,version=1.7,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:type=packageState,version=1.5,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=Compilation
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.ws.jmx.mbeans.generatePluginConfig
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=OperatingSystem
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=PluginUtility,name=PluginConfigRequester
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: JMImplementation:type=MBeanServerDelegate
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryManager,name=Metaspace Manager
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=channelfw,type=endpoint,name=defaultHttpEndpoint
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=ClassLoading
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: com.sun.management:type=HotSpotDiagnostic
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:name=com.ibm.websphere.config.mbeans.ServerXMLConfigurationMBean
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryManager,name=CodeCacheManager
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=ejbPersistentTimer,type=EJBPersistentTimerService,name=EJBPersistentTimerService
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=MemoryPool,name=Code Cache
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:type=framework,version=1.7,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=persistence,type=DDLGenerationMBean,name=DDLGenerationMBean
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.nio:type=BufferPool,name=direct
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: osgi.core:type=serviceState,version=1.7,framework=org.eclipse.osgi,uuid=1e536b3a-5a70-420e-b7f2-a0d1a4d1bb51
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:service=com.ibm.websphere.application.ApplicationMBean,name=weboffer
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:feature=kernel,name=ServerEndpointControl
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=GarbageCollector,name=PS MarkSweep
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: com.sun.management:type=DiagnosticCommand
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: WebSphere:service=com.ibm.ws.kernel.filemonitor.FileNotificationMBean
Nov 24, 2021 2:30:20 PM io.openliberty.arquillian.managed.WLPManagedContainer logAllApps
INFO: java.lang:type=Memory
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 43.261 s <<< FAILURE! - in za.co.nb.offermanagement.apis.resources.RecalculateOfferIT
[ERROR] za.co.nb.offermanagement.apis.resources.RecalculateOfferIT  Time elapsed: 43.257 s  <<< ERROR!
org.jboss.arquillian.container.spi.client.container.DeploymentException: Timeout while waiting for "weboffer" ApplicationMBean to reach STARTED. Actual state: STOPPED.

Stopping server defaultServer.
[AUDIT   ] CWWKE0055I: Server shutdown requested on Wednesday 24 November 2021 at 2:30 PM. The server defaultServer is shutting down.
[AUDIT   ] CWWKE1100I: Waiting for up to 30 seconds for the server to quiesce.
[INFO    ] CWWKO0220I: TCP Channel defaultHttpEndpoint has stopped listening for requests on host *  (IPv6) port 9080.
[INFO    ] CWWKE1101I: Server quiesce complete.
[AUDIT   ] CWWKI0002I: The CORBA name server is no longer available at corbaloc:iiop:localhost:2809/NameService.
[AUDIT   ] CWWKE0036I: The server defaultServer stopped after 43.785 seconds.
Server defaultServer stopped.
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR]   RecalculateOfferIT » Deployment Timeout while waiting for "weboffer" Applicati...
[INFO]
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO]

编辑 2messages.log:

********************************************************************************
product = Open Liberty 21.0.0.11 (wlp-1.0.58.cl211120211019-1900)
wlp.install.dir = C:/Users/cc327150/dev/projects/nedbank/bpmexjee-offermanagement/WebOfferManagement/target/liberty/wlp/
java.home = C:\Users\cc327150\dev\tools\jdk8u312\jre
java.version = 1.8.0_312
java.runtime = OpenJDK Runtime Environment (1.8.0_312-b07)
os = Windows 10 (10.0; amd64) (en_ZA)
process = 18348@V105P10PRA4704
********************************************************************************
[2021/11/25 15:29:37:212 CAT] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager           A CWWKE0001I: The server defaultServer has been launched.
[2021/11/25 15:30:01:917 CAT] 00000013 com.ibm.ws.config.xml.internal.ServerXMLConfiguration        A CWWKG0093A: Processing configuration drop-ins resource: C:\Users\cc327150\dev\projects\nedbank\bpmexjee-offermanagement\WebOfferManagement\target\liberty\wlp\usr\servers\defaultServer\configDropins\overrides\liberty-plugin-variable-config.xml
[2021/11/25 15:30:02:520 CAT] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager           I CWWKE0002I: The kernel started after 26.211 seconds
[2021/11/25 15:30:03:573 CAT] 0000001c com.ibm.ws.kernel.feature.internal.FeatureManager            I CWWKF0007I: Feature update started.
[2021/11/25 15:30:12:061 CAT] 00000014 .apache.cxf.cxf.core.3.2:1.0.58.cl211120211019-1900(id=149)] I Aries Blueprint packages not available. So namespaces will not be registered
[2021/11/25 15:30:12:781 CAT] 00000013 com.ibm.ws.app.manager.internal.monitor.DropinMonitor        A CWWKZ0058I: Monitoring dropins for applications.
[2021/11/25 15:30:14:909 CAT] 00000014 com.ibm.ws.transport.iiop.internal.ORBWrapperInternal        A CWWKI0001I: The CORBA name server is now available at corbaloc:iiop:localhost:2809/NameService.
[2021/11/25 15:30:16:598 CAT] 0000001f com.ibm.ws.app.manager.AppMessageHelper                      W CWWKZ0014W: The application weboffer could not be started as it could not be found at location weboffer.war.
[2021/11/25 15:30:16:614 CAT] 0000001c com.ibm.ws.tcpchannel.internal.TCPPort                       I CWWKO0219I: TCP Channel defaultHttpEndpoint has been started and is now listening for requests on host *  (IPv6) port 9080.
[2021/11/25 15:30:16:786 CAT] 0000001c com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0012I: The server installed the following features: [ejb-3.2, ejbHome-3.2, ejbLite-3.2, ejbPersistentTimer-3.2, ejbRemote-3.2, jaxrs-2.1, jaxrsClient-2.1, jca-1.7, jdbc-4.1, jndi-1.0, jsonp-1.1, localConnector-1.0, mdb-3.2, servlet-4.0].
[2021/11/25 15:30:16:786 CAT] 0000001c com.ibm.ws.kernel.feature.internal.FeatureManager            I CWWKF0008I: Feature update completed in 14.273 seconds.
[2021/11/25 15:30:16:786 CAT] 0000001c com.ibm.ws.kernel.feature.internal.FeatureManager            A CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 40.472 seconds.
[2021/11/25 15:30:17:177 CAT] 0000000f com.ibm.ws.kernel.launch.internal.ServerCommandListener      A CWWKE0055I: Server shutdown requested on Thursday 25 November 2021 at 3:30 PM. The server defaultServer is shutting down.
[2021/11/25 15:30:17:724 CAT] 00000029 com.ibm.ws.runtime.update.internal.RuntimeUpdateManagerImpl  A CWWKE1100I: Waiting for up to 30 seconds for the server to quiesce.
[2021/11/25 15:30:17:756 CAT] 0000001e com.ibm.ws.tcpchannel.internal.TCPChannel                    I CWWKO0220I: TCP Channel defaultHttpEndpoint has stopped listening for requests on host *  (IPv6) port 9080.
[2021/11/25 15:30:17:776 CAT] 00000029 com.ibm.ws.runtime.update.internal.RuntimeUpdateManagerImpl  I CWWKE1101I: Server quiesce complete.
[2021/11/25 15:30:17:931 CAT] 00000029 com.ibm.ws.transport.iiop.internal.ORBWrapperInternal        A CWWKI0002I: The CORBA name server is no longer available at corbaloc:iiop:localhost:2809/NameService.
[2021/11/25 15:30:20:081 CAT] 00000001 com.ibm.ws.kernel.launch.internal.FrameworkManager           A CWWKE0036I: The server defaultServer stopped after 43.771 seconds.

编辑 3:

<server description="Sample Liberty server">
    <featureManager>
        <feature>jaxrs-2.1</feature>
        <feature>jsonp-1.1</feature>
        <feature>localConnector-1.0</feature>
        <feature>servlet-4.0</feature>
        <feature>ejb-3.2</feature>
    </featureManager>

    <variable name="default.http.port" defaultValue="9080"/>
    <variable name="default.https.port" defaultValue="9443"/>

    <webApplication location="weboffer.war" contextRoot="/" />
    
    <applicationManager startTimeout="200s" />
    <applicationMonitor updateTrigger="mbean" />

    <httpEndpoint host="*" httpPort="$default.http.port" 
                  httpsPort="$default.https.port" id="defaultHttpEndpoint"/>
</server>

【问题讨论】:

> 等待“weboffer”ApplicationMBean 到达 STARTED 时超时。实际状态:已停止。这个错误是不寻常的。通常,无法启动的应用程序最终处于 INSTALLED 状态(此时我们尝试从日志中提取故障)。启动时间过长的应用程序最终处于 STARTING 状态。你能检查一下服务器的messages.log,看看启动应用程序是否出错? 我认为关键信息是: [ERROR ] CWWKZ0013E: 无法启动两个名为 weboffer 的应用程序。这意味着该应用程序根本没有安装。检查服务器的 dropins 目录中是否有名为 weboffer.war(或类似文件)的文件。还要检查您的服务器配置(server.xml 等)以获取应用程序配置元素。如果您使用的是 arquillian,那么它将安装应用程序 - 您应该从 dropins/apps 目录中删除该文件以及在服务器配置中引用它的任何配置。 HTH。 @Azquelt 请参阅 EDIT 2 那里不多。我尝试将日志记录设置为跟踪,但我认为 AUDIT 是最冗长的......我认为? @AndyMcCright 查看了 dropin 目录,没有战争或其他任何东西。请参阅 EDIT 3 for server.xml 通常在编写 arquillian 测试时,您不会手动定义上下文根。您的测试在服务器上运行,因此他们不需要知道上下文根,或者对于客户端测试,arquillian 可以使用@ArquillianResource 将应用程序的 URL 注入您的测试中。见arquillian.org/arquillian-core/#arquillian-resource-injection 【参考方案1】:

您使用的是哪个 Jakarta EE 版本?

过去几年我为 Jakarta EE 8 和 9 创建了一些模板和项目。

检查Jakarta EE 8 template project 和Jakarta EE 9 template project,两者都包括Arquillian OpenLiberty 托管和远程适配器配置,请注意阅读相关文档了解详细信息,这些项目的自述文件中提供的链接。

对于 arqullian.xml 配置,请查看Jakarta EE 9 readme。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jboss.org/schema/arquillian"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

    <engine>
        <property name="deploymentExportPath">target/</property>
    </engine>
    
    <container qualifier="liberty-remote">
        <configuration>
            <property name="hostName">localhost</property>
            <property name="serverName">defaultServer</property>
            <property name="username">admin</property>
            <property name="password">admin</property>
            <property name="httpPort">9080</property>
            <property name="httpsPort">9443</property>

            <!-- change appDeployTimeout here -->
            <property name="appDeployTimeout">120</property>
        </configuration>
    </container>
</arquillian>

【讨论】:

我看过这些项目。我将添加日志记录 JavaEE 7. 我将 xml 应用到 arquillian.xml 但收到了同样的问题。如果arquillian.xml 位于src/test/resources 下可以吗?

以上是关于Openliberty arquillian 测试的主要内容,如果未能解决你的问题,请参考以下文章

Arquillian,Runclient测试为远程

我如何在OpenLiberty开发人员模式下执行测试的子集

使用arquillian测试远程客户端jndi查找

是否可以使用arquillian资源进行参数化测试?

无法在使用 Arquillian 和 WildFly 的 JPA 集成测试中注入 EntityManager

如何为 Arquillian UI 测试重置数据库