2017-11-10 23 views
0

과 같은 질문입니다. 내가 wildfly 인스턴스를 실행하면 내 통합 테스트를 실행할 수 없습니다. 2 개의 다른 서버 위치를 가리키는 경우 동일합니다.Arquillian 통합 테스트 - wildfly의 다른 인스턴스가 실행 중일 때 테스트를 실행할 수 없습니다.

arquillan :

<arquillian xmlns="http://jboss.org/schema/arquillian" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> 

    <container qualifier="wildfly" default="true"> 
     <configuration> 
      <property name="jbossHome">${jboss.home}</property> 
      <property name="modulePath">${module.path}</property> 
      <property name="outputToConsole">true</property> 
     </configuration> 
    </container> 

</arquillian> 

오류 :

Could not invoke start on: [email protected] 
    org.jboss.arquillian.container.spi.client.container.LifecycleException 
     at org.jboss.as.arquillian.container.embedded.EmbeddedDeployableContainer.startInternal(EmbeddedDeployableContainer.java:62) 
     at org.jboss.as.arquillian.container.CommonDeployableContainer.start(CommonDeployableContainer.java:123) 
     at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:199) 
     at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:163) 
     at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$8.perform(ContainerLifecycleController.java:157) 
     at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255) 
     at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startContainer(ContainerLifecycleController.java:156) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:498) 
     at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) 
     at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103) 
     at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85) 
     at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:498) 
     at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) 
     at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92) 
     at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143) 
     at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) 
     at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) 
     at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:77) 
     at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$2.perform(ContainerLifecycleController.java:70) 
     at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachSuiteContainer(ContainerLifecycleController.java:221) 
     at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.startSuiteContainers(ContainerLifecycleController.java:69) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:498) 
     at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) 
     at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103) 
     at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85) 
     at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143) 
     at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) 
     at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) 
     at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:86) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:498) 
     at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) 
     at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103) 
     at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:85) 
     at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:498) 
     at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:96) 
     at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:92) 
     at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:143) 
     at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) 
     at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:75) 
     at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:116) 
     at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) 
     at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) 
     at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:498) 
     at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) 
     at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) 
     at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) 
     at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:81) 
     at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) 
    Caused by: java.lang.IllegalStateException: WFLYEMB0022: Cannot invoke 'start' on embedded process 
     at org.wildfly.core.embedded.EmbeddedManagedProcessImpl.invokeOnServer(EmbeddedManagedProcessImpl.java:93) 
     at org.wildfly.core.embedded.EmbeddedManagedProcessImpl.start(EmbeddedManagedProcessImpl.java:55) 
     at org.jboss.as.arquillian.container.embedded.EmbeddedDeployableContainer.startInternal(EmbeddedDeployableContainer.java:60) 
     ... 68 more 
    Caused by: org.wildfly.core.embedded.EmbeddedProcessStartException: WFLYEMB0021: Cannot start embedded process 
     at org.wildfly.core.embedded.EmbeddedStandaloneServerFactory$StandaloneServerImpl.start(EmbeddedStandaloneServerFactory.java:320) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:498) 
     at org.wildfly.core.embedded.EmbeddedManagedProcessImpl.invokeOnServer(EmbeddedManagedProcessImpl.java:81) 
     ... 70 more 
    Caused by: java.util.concurrent.ExecutionException: Operation failed 
     at org.jboss.threads.AsyncFutureTask.operationFailed(AsyncFutureTask.java:74) 
     at org.jboss.threads.AsyncFutureTask.get(AsyncFutureTask.java:268) 
     at org.wildfly.core.embedded.EmbeddedStandaloneServerFactory$StandaloneServerImpl.start(EmbeddedStandaloneServerFactory.java:301) 
     ... 75 more 
    Caused by: java.lang.Exception: WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details. 
     at org. 

jboss.as.server.BootstrapListener.bootFailure(BootstrapListener.java:87) 
    at org.jboss.as.server.ServerService.boot(ServerService.java:417) 
    at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:370) 
    at java.lang.Thread.run(Thread.java:748) 

누군가가 나를 도와 드릴까요? 내 pom에 jboss.home 속성이 있습니다. 여기에 어떤 오류가 발생할 수 있는지 알 수 없습니다.

<plugin> 
       <artifactId>maven-surefire-plugin</artifactId> 
       <configuration> 
        <systemProperties> 
         <property> 
          <name>java.util.logging.manager</name> 
          <value>org.jboss.logmanager.LogManager</value> 
         </property> 
        </systemProperties> 
        <forkMode>always</forkMode> 
        <systemPropertyVariables> 
         <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager> 
         <jboss.home>${jboss.home}</jboss.home> 
         <module.path>${jboss.home}/modules</module.path> 
        </systemPropertyVariables> 
       </configuration> 
      </plugin> 

어쩌면 다른 최신 기술이 있습니까? arquillian없이 bean을 테스트하려면 어떻게해야합니까?

<argLine>-Djboss.socket.binding.port-offset=100</argLine> 

할 것입니다 구성 섹션에 추가 :

답변

1

뭔가처럼 생각합니다. 이것은 모든 포트가 100으로 오프셋 된 Wildfly를 실행합니다.

+0

작동하지 않습니다 - 추가하려고했으나 여전히 동일합니다 – Razikus

+0

@Razikus 해결책을 찾았습니까? 나는 같은 문제에 직면하고있다. –

+0

@ MichalHeneš 안녕하세요. 해결 방법을 찾았습니다. 관리 콘솔에서 실행중인 wildfly에 배포 할 가능성이 있습니다. 내 소스 코드는 https://github.com/Razikus/Casino-server/blob/master/src/test/resources/arquillian.xml에서 확인하십시오. add-user.sh 스크립트를 사용하여 관리 사용자를 추가해야합니다. – Razikus