[JBoss JIRA] (ARQ-1282) TestNG @DataProvider is fully invoked for each record
by Vitor Moraes (JIRA)
[ https://issues.jboss.org/browse/ARQ-1282?page=com.atlassian.jira.plugin.s... ]
Vitor Moraes commented on ARQ-1282:
-----------------------------------
Solution?
> TestNG @DataProvider is fully invoked for each record
> -----------------------------------------------------
>
> Key: ARQ-1282
> URL: https://issues.jboss.org/browse/ARQ-1282
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JBoss AS Containers
> Affects Versions: 1.0.3.Final
> Reporter: Karel Cemus
>
> h2. Expected behavior
> TestNG defines @DataProvider annotation to allow single method to perform multiple test cases. Provider method annotated with @DataProvider returns an array of arrays, each containing one test case. These parameters are given to the target method as input parameters. By the definition, the total count of performed test by single method is equal to number of test cases in related data provider.
> h2. Actual behavior
> Using TestNG under Arquillian framework makes this functionality buggy. Although the client (maven, IDE, etc.) thinks, that the total number of invoked test is correct, it is not. When we take a look into server's log, we can see that for each single test case it invoked full set of all test cases. It means, that in the end the amount of performed tests is equal to expected count squared. Such behaviour is not only slow but also in some cases it doesn't work and it makes tests to fail.
> h2. Example
> {code:java}
> @DataProvider
> public Object[][] sumProvider() {
> return new Object[][]{
> new Object[]{ 0, 0, 0 },
> new Object[]{ 1, 1, 2 },
> new Object[]{ 1, 5, 6 },
> new Object[]{ 5, 1, 6 }
> };
> }
> {code}
> h3. Expected output in server log
> {quote}
> Execution of sum: 0 + 0 = 0
> Execution of sum: 1 + 1 = 2
> Execution of sum: 1 + 5 = 6
> Execution of sum: 5 + 1 = 6
> {quote}
> h3. Actual output
> {quote}
> Execution of sum: 0 + 0 = 0
> Execution of sum: 1 + 1 = 2
> Execution of sum: 1 + 5 = 6
> Execution of sum: 5 + 1 = 6
> Execution of sum: 0 + 0 = 0
> Execution of sum: 1 + 1 = 2
> Execution of sum: 1 + 5 = 6
> Execution of sum: 5 + 1 = 6
> Execution of sum: 0 + 0 = 0
> Execution of sum: 1 + 1 = 2
> Execution of sum: 1 + 5 = 6
> Execution of sum: 5 + 1 = 6
> Execution of sum: 0 + 0 = 0
> Execution of sum: 1 + 1 = 2
> Execution of sum: 1 + 5 = 6
> Execution of sum: 5 + 1 = 6
> {quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (ARQ-567) Supporting Test Suites (@ArquillianSuite)
by Davy Herben (JIRA)
[ https://issues.jboss.org/browse/ARQ-567?page=com.atlassian.jira.plugin.sy... ]
Davy Herben edited comment on ARQ-567 at 7/18/13 7:35 AM:
----------------------------------------------------------
Hi, great work gentlemen. I've tested this on our project, where we have 1200 arquillian tests against a standalone glassfish 3.1, and using this extension easily cuts our total build time in half! Very excited about this :)
I've encountered one issue though, which is killing the maven build. The build correctly deploys the test archive only once, but it does not undeploy it after all integration tests have run. This leaves the test archive deployed. On the next build, the deployment fails because glassfish complains that the archive already exists. I've been looking at a way to make arquillian provide the --force argument to the glassfish deployment to force an override, but this does not seem to be possible with the current adapter.
Any ideas on how to fix this? In case it matters: I have set up the maven failsafe plugin to simply run all *ContainerIT tests, not to run a specific junit TestSuite.
was (Author: dherben):
Hi, great work gentlemen. I've tested this on our project, where we have 1200 arquillian tests against a standalone glassfish 3.1, and using this extension easily cuts our total build time in half! Very excited about this :)
I've encountered one issue though, which is killing the maven build. The build correctly deploys the test archive only once, but it does not undeploy it after all integration tests have run. This leaves the test archive deployed. On the next build, the deployment fails because glassfish complains that the archive already exists. I've been looking at a way to make arquillian provide the --force argument to the glassfish deployment to force an override, but this does not seem to be possible with the current adapter.
Any ideas on how to fix this? In case it matters: I have set up the maven surefire plugin to simply run all *ContainerIT tests, not to run a specific junit TestSuite.
> Supporting Test Suites (@ArquillianSuite)
> -----------------------------------------
>
> Key: ARQ-567
> URL: https://issues.jboss.org/browse/ARQ-567
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Mousavi Jahan Abadi S. M.
>
> Currently, it is supported that JUnit test cases being run by Arquillian. This feature request is request for supporting test suites too to be run by Arquillian too. Idea is like:
> @RunWith(ArquillianSuite.class)
> @Suite.SuiteClasses( { TestCase1.class, TestCase2.class, .... } )
> public class AllTests{
> @Deployment
> public static JavaArchive createTestArchive(){
> return ShrinkWrap.create(JavaArchive.class,"test.jar");
> }
> }
> The advantages of above approach for users of Arquillian framework are:
> - Test cases don't needed to be modified to have: "@RunWith(Arquillian.class)" annotation. In other words, test cases will be pure JUnit code, and no Arquillian code (results in less coding for end users).
> - It is not necessary to include the static "@Deployment" methods in all test cases any more, and only Test Suite need to define the archieving/deployment related setting/definitions.
> The advantage of above approach for framework itself is:
> - From performance point-of-view, it becomes possible for Arquillian to deploy all test cases in the Test Suite into J2EE container in one action (one deploy/undeploy for one test suite, instead of mulitple deploy/undeploy for each test case).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (ARQ-567) Supporting Test Suites (@ArquillianSuite)
by Davy Herben (JIRA)
[ https://issues.jboss.org/browse/ARQ-567?page=com.atlassian.jira.plugin.sy... ]
Davy Herben commented on ARQ-567:
---------------------------------
Hi, great work gentlemen. I've tested this on our project, where we have 1200 arquillian tests against a standalone glassfish 3.1, and using this extension easily cuts our total build time in half! Very excited about this :)
I've encountered one issue though, which is killing the maven build. The build correctly deploys the test archive only once, but it does not undeploy it after all integration tests have run. This leaves the test archive deployed. On the next build, the deployment fails because glassfish complains that the archive already exists. I've been looking at a way to make arquillian provide the --force argument to the glassfish deployment to force an override, but this does not seem to be possible with the current adapter.
Any ideas on how to fix this? In case it matters: I have set up the maven surefire plugin to simply run all *ContainerIT tests, not to run a specific junit TestSuite.
> Supporting Test Suites (@ArquillianSuite)
> -----------------------------------------
>
> Key: ARQ-567
> URL: https://issues.jboss.org/browse/ARQ-567
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Reporter: Mousavi Jahan Abadi S. M.
>
> Currently, it is supported that JUnit test cases being run by Arquillian. This feature request is request for supporting test suites too to be run by Arquillian too. Idea is like:
> @RunWith(ArquillianSuite.class)
> @Suite.SuiteClasses( { TestCase1.class, TestCase2.class, .... } )
> public class AllTests{
> @Deployment
> public static JavaArchive createTestArchive(){
> return ShrinkWrap.create(JavaArchive.class,"test.jar");
> }
> }
> The advantages of above approach for users of Arquillian framework are:
> - Test cases don't needed to be modified to have: "@RunWith(Arquillian.class)" annotation. In other words, test cases will be pure JUnit code, and no Arquillian code (results in less coding for end users).
> - It is not necessary to include the static "@Deployment" methods in all test cases any more, and only Test Suite need to define the archieving/deployment related setting/definitions.
> The advantage of above approach for framework itself is:
> - From performance point-of-view, it becomes possible for Arquillian to deploy all test cases in the Test Suite into J2EE container in one action (one deploy/undeploy for one test suite, instead of mulitple deploy/undeploy for each test case).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (ARQ-1237) Warp: use PortProber to determine free ports for proxy
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQ-1237?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on ARQ-1237:
---------------------------------
I was just curious when planning new sprint for Beta1. :-) Thanks for help.
> Warp: use PortProber to determine free ports for proxy
> ------------------------------------------------------
>
> Key: ARQ-1237
> URL: https://issues.jboss.org/browse/ARQ-1237
> Project: Arquillian
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Extension - Warp
> Affects Versions: warp_1.0.0.Alpha2
> Reporter: Lukáš Fryč
> Assignee: Bartosz Majsak
> Priority: Minor
> Fix For: warp_1.0.0.Beta1
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> Selenium 2 uses {{PortProber}} to check free ports to run Selenium Server on.
> We can leverage that component too for Warp proxy and avoid conflicting ports.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (ARQ-1427) Arquillian Spock test fails with NPE when a subclass of spock.lang.Specification is used
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1427?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak updated ARQ-1427:
--------------------------------
Fix Version/s: spock_1.0.0.next
> Arquillian Spock test fails with NPE when a subclass of spock.lang.Specification is used
> ----------------------------------------------------------------------------------------
>
> Key: ARQ-1427
> URL: https://issues.jboss.org/browse/ARQ-1427
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Spock TestRunner
> Affects Versions: spock_1.0.0.Beta1
> Reporter: Luca Graf
> Assignee: Karel Piwko
> Fix For: spock_1.0.0.next
>
>
> If an arquillian spock test is extended from a subclass of spock.lang.Specification the test can't be executed and fails with a NPE.
> {code:title=MySpecification.groovy}
> abstract class MySpecification extends spock.lang.Specification{
> }
> {code}
> {code:title=SpockSpecSubclassIt.groovy}
> @ArquillianSpecification
> class SpockSpecSubclassIt extends MySpecification {
> @Deployment
> static WebArchive deployment() {
> ShrinkWrap.create( WebArchive.class )
> }
> void 'test'() {
> expect:
> 'foo' != 'bar'
> }
> }
> {code}
> {code:title=Exception}
> java.lang.NullPointerException
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.lookup(ContainerEventController.java:164)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:146)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:95)
> at org.jboss.arquillian.spock.ArquillianInterceptor.interceptSetupMethod(ArquillianInterceptor.java:77)
> at org.spockframework.runtime.extension.AbstractMethodInterceptor.intercept(AbstractMethodInterceptor.java:28)
> at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:84)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> java.lang.NullPointerException
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.lookup(ContainerEventController.java:164)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:146)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createAfterContext(ContainerEventController.java:134)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.after(EventTestRunnerAdaptor.java:103)
> at org.jboss.arquillian.spock.ArquillianInterceptor.interceptCleanupMethod(ArquillianInterceptor.java:89)
> at org.spockframework.runtime.extension.AbstractMethodInterceptor.intercept(AbstractMethodInterceptor.java:31)
> at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:84)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (ARQ-1429) Spock Appender is missing org.objectweb.asm package
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1429?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak updated ARQ-1429:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: spock_1.0.0.next
Resolution: Done
Pushed upstream. Thank you!
> Spock Appender is missing org.objectweb.asm package
> ---------------------------------------------------
>
> Key: ARQ-1429
> URL: https://issues.jboss.org/browse/ARQ-1429
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Spock TestRunner
> Affects Versions: spock_1.0.0.Beta1
> Reporter: Karel Piwko
> Assignee: Karel Piwko
> Priority: Blocker
> Fix For: spock_1.0.0.next
>
>
> ASM is used in Groovy, which leads to CNFE when run in server.
> {code}
> @Produces
> @PersistenceContext(unitName = "pushee-default", type = PersistenceContextType.EXTENDED)
> @Default
> EntityManager entityManager;
> @Inject
> PushApplicationDao pushAppDao;
> def "find all registered apps"() {
> when: "Check for all registered apps"
> List<PushApplication> apps = pushAppDao.findAll();
> then: "DAO was injected"
> pushAppDao!=null
> and: "No applications were defined"
> apps.size()==0
> }
> {code}
> leads to:
> {code}
> 17:19:55,691 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /test
> 17:19:55,742 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS018559: Deployed "test.war"
> 17:19:56,485 WARN [org.jboss.modules] (http--127.0.0.1-8080-1) Failed to define class org.codehaus.groovy.ast.FieldNode in Module "deployment.test.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/codehaus/groovy/ast/FieldNode (Module "deployment.test.war:main" from Service Module Loader)
> at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)
> at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
> at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
> at org.jboss.modules.Module.loadModuleClass(Module.java:517)
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.7.0_21]
> at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413) [rt.jar:1.7.0_21]
> at java.lang.Class.getConstructor0(Class.java:2723) [rt.jar:1.7.0_21]
> at java.lang.Class.newInstance0(Class.java:345) [rt.jar:1.7.0_21]
> at java.lang.Class.newInstance(Class.java:327) [rt.jar:1.7.0_21]
> at org.codehaus.groovy.vmplugin.VMPluginFactory.createPlugin(VMPluginFactory.java:56) [arquillian-spock.jar:]
> at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:41) [arquillian-spock.jar:]
> at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:99) [arquillian-spock.jar:]
> at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:71) [arquillian-spock.jar:]
> at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:33) [arquillian-spock.jar:]
> at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:162) [arquillian-spock.jar:]
> at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:192) [arquillian-spock.jar:]
> at org.jboss.aerogear.connectivity.jpa.dao.impl.PushDaoSpecification.$getStaticMetaClass(PushDaoSpecification.groovy) [3728ce10-7709-4805-ac00-a0983db929fd.jar:]
> at org.jboss.aerogear.connectivity.jpa.dao.impl.PushDaoSpecification.<init>(PushDaoSpecification.groovy) [3728ce10-7709-4805-ac00-a0983db929fd.jar:]
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_21]
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_21]
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_21]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_21]
> at java.lang.Class.newInstance0(Class.java:374) [rt.jar:1.7.0_21]
> at java.lang.Class.newInstance(Class.java:327) [rt.jar:1.7.0_21]
> at org.spockframework.runtime.BaseSpecRunner.createSpecInstance(BaseSpecRunner.java:121) [arquillian-spock.jar:]
> at org.spockframework.runtime.BaseSpecRunner.run(BaseSpecRunner.java:80) [arquillian-spock.jar:]
> at org.spockframework.runtime.Sputnik.run(Sputnik.java:63) [arquillian-spock.jar:]
> at org.jboss.arquillian.spock.container.SpockTestRunner.runTest(SpockTestRunner.java:81) [arquillian-spock.jar:]
> at org.jboss.arquillian.spock.container.SpockTestRunner.execute(SpockTestRunner.java:61) [arquillian-spock.jar:]
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:160) [arquillian-protocol.jar:]
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126) [arquillian-protocol.jar:]
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90) [arquillian-protocol.jar:]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
> at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]
> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
> at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
> Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/Opcodes
> at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_21]
> at java.lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_21]
> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_21]
> at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
> at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
> ... 55 more
> Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Opcodes from [Module "deployment.test.war:main" from Service Module Loader]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> ... 60 more
> {code}
> The problematic part is that asm suffers the same problem as Groovy pre 2.1.4 version (http://jira.codehaus.org/browse/GROOVY-6158)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (ARQ-1427) Arquillian Spock test fails with NPE when a subclass of spock.lang.Specification is used
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1427?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak updated ARQ-1427:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
Pushed upstream. Thank you!
> Arquillian Spock test fails with NPE when a subclass of spock.lang.Specification is used
> ----------------------------------------------------------------------------------------
>
> Key: ARQ-1427
> URL: https://issues.jboss.org/browse/ARQ-1427
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Spock TestRunner
> Affects Versions: spock_1.0.0.Beta1
> Reporter: Luca Graf
> Assignee: Karel Piwko
>
> If an arquillian spock test is extended from a subclass of spock.lang.Specification the test can't be executed and fails with a NPE.
> {code:title=MySpecification.groovy}
> abstract class MySpecification extends spock.lang.Specification{
> }
> {code}
> {code:title=SpockSpecSubclassIt.groovy}
> @ArquillianSpecification
> class SpockSpecSubclassIt extends MySpecification {
> @Deployment
> static WebArchive deployment() {
> ShrinkWrap.create( WebArchive.class )
> }
> void 'test'() {
> expect:
> 'foo' != 'bar'
> }
> }
> {code}
> {code:title=Exception}
> java.lang.NullPointerException
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.lookup(ContainerEventController.java:164)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:146)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:95)
> at org.jboss.arquillian.spock.ArquillianInterceptor.interceptSetupMethod(ArquillianInterceptor.java:77)
> at org.spockframework.runtime.extension.AbstractMethodInterceptor.intercept(AbstractMethodInterceptor.java:28)
> at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:84)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> java.lang.NullPointerException
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.lookup(ContainerEventController.java:164)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:146)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createAfterContext(ContainerEventController.java:134)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.after(EventTestRunnerAdaptor.java:103)
> at org.jboss.arquillian.spock.ArquillianInterceptor.interceptCleanupMethod(ArquillianInterceptor.java:89)
> at org.spockframework.runtime.extension.AbstractMethodInterceptor.intercept(AbstractMethodInterceptor.java:31)
> at org.spockframework.runtime.extension.MethodInvocation.proceed(MethodInvocation.java:84)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.spockframework.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:138)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months