[JBoss JIRA] (ARQ-941) Make Exception.class default for value attribute on @ShouldThrowException
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-941?page=com.atlassian.jira.plugin.sy... ]
Aslak Knutsen closed ARQ-941.
-----------------------------
> Make Exception.class default for value attribute on @ShouldThrowException
> -------------------------------------------------------------------------
>
> Key: ARQ-941
> URL: https://issues.jboss.org/browse/ARQ-941
> Project: Arquillian
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Base Implementation
> Reporter: Dan Allen
> Priority: Minor
> Labels: starter
> Fix For: 1.0.4.Final
>
>
> The annotation @ShouldThrowException is expressive enough to be understood as meaning a generic Exception will be thrown (during deployment) unless a more specific exception is specified.
> Therefore, a default should be specified for the value attribute such that:
> @ShouldThrowException == @ShouldThrowException(Exception.class)
> Here's the resulting annotation definition:
> {code:java}
> @Documented
> @Retention(RUNTIME)
> @Target(ElementType.METHOD)
> public @interface ShouldThrowException {
> Class<? extends Exception> value() default Exception.class;
> }
> {code}
> (Alternatively, the default can be Throwable.class, though the value of least surprise is likely Exception.class).
--
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, 6 months
[JBoss JIRA] (ARQ-863) Poor error message when WebArchive deployed with ".jar" name
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-863?page=com.atlassian.jira.plugin.sy... ]
Aslak Knutsen closed ARQ-863.
-----------------------------
> Poor error message when WebArchive deployed with ".jar" name
> ------------------------------------------------------------
>
> Key: ARQ-863
> URL: https://issues.jboss.org/browse/ARQ-863
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 1.0.0.CR8
> Environment: Jboss AS 7.1.1.Final
> java version "1.7.0_01"
> Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
> Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
> Linux ayaki.localdomain 3.3.0-4.fc16.x86_64 #1 SMP Tue Mar 20 18:05:40 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> Reporter: Craig Ringer
> Assignee: Tommy Tynjä
> Priority: Minor
> Fix For: 1.0.4.Final
>
> Attachments: ArquillianShrinkwrapWarBug.zip
>
>
> If a WebArchive is deployed with the name ending in ".jar" instead of ".war" (due to, eg, a stupid editing mistake) the error message is not at all helpful. The container will fail to run the test class with a ClassNotFoundException for the test class.
> It'd be really nice if the deployer or the packager would detect this issue and report it.
> {code}
> 13:58:42,082 ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (pool-1-thread-29) Failed: com.example.shrinkwrapwarbug.DemoTest.testReturnOne:
> java.lang.ClassNotFoundException: com.example.shrinkwrapwarbug.DemoTest from [Module "deployment.demo.jar:main" from Service Module Loader]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
> at org.jboss.as.arquillian.service.ArquillianConfig.loadClass(ArquillianConfig.java:130) [arquillian-service:]
> at org.jboss.as.arquillian.service.ArquillianService$ExtendedTestClassLoader.loadTestClass(ArquillianService.java:259) [arquillian-service:]
> at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:124) [arquillian-service:]
> at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]
> at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:226) [arquillian-service:]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_01]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_01]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_01]
> at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_01]
> at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:111) [rt.jar:1.7.0_01]
> at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:45) [rt.jar:1.7.0_01]
> at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:235) [rt.jar:1.7.0_01]
> at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [rt.jar:1.7.0_01]
> at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:250) [rt.jar:1.7.0_01]
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [rt.jar:1.7.0_01]
> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791) [rt.jar:1.7.0_01]
> at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:498)
> at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:246)
> at org.jboss.remotingjmx.protocol.v1.ServerProxy$InvokeHandler.handle(ServerProxy.java:1034)
> at org.jboss.remotingjmx.protocol.v1.ServerProxy$MessageReciever$1.run(ServerProxy.java:215)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_01]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_01]
> at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
> {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, 6 months
[JBoss JIRA] (ARQ-1154) parameter "servletName" not used
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1154?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1154.
------------------------------
> parameter "servletName" not used
> --------------------------------
>
> Key: ARQ-1154
> URL: https://issues.jboss.org/browse/ARQ-1154
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Test Protocol SPIs and Implementation
> Affects Versions: 1.0.0.Final
> Reporter: Arne Plöse
> Assignee: Tommy Tynjä
> Fix For: 1.0.4.Final
>
>
> in org.jboss.arquillian.protocol.servlet.ServletUtil.public static URI determineBaseURI(ServletProtocolConfiguration config, HTTPContext context, String servletName)
> the parameter servletName is not used, instead ServletMethodExecutor.ARQUILLIAN_SERVLET_NAME is fixed wired as servletName...
--
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, 6 months
[JBoss JIRA] (ARQ-700) Properties in arquillian.xml should handle new lines (by trimming them)
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-700?page=com.atlassian.jira.plugin.sy... ]
Aslak Knutsen closed ARQ-700.
-----------------------------
> Properties in arquillian.xml should handle new lines (by trimming them)
> ------------------------------------------------------------------------
>
> Key: ARQ-700
> URL: https://issues.jboss.org/browse/ARQ-700
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Configuration
> Affects Versions: 1.0.0.CR6
> Reporter: Hardy Ferentschik
> Assignee: Bartosz Majsak
> Labels: starter
> Fix For: 1.0.4.Final
>
>
> When trying to add _javaVmArguments_ to _arquillian.xml_ in order to debug the container new lines in the property will cause the container start to fail.
> For example, the following works:
> {code}
> <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">
> <engine>
> <property name="deploymentExportPath">target/</property>
> </engine>
> <container qualifier="jboss" default="true">
> <protocol type="jmx-as7">
> <property name="executionType">REMOTE</property>
> </protocol>
> <configuration>
> <property name="jbossHome">target/jboss-as-7.1.0.Beta1</property>
> <property name="javaVmArguments">-Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y -Xmx512m -XX:MaxPermSize=128m</property>
> </configuration>
> </container>
> </arquillian>
> {code}
> whereas this fails:
> {code}
> <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">
> <engine>
> <property name="deploymentExportPath">target/</property>
> </engine>
> <container qualifier="jboss" default="true">
> <protocol type="jmx-as7">
> <property name="executionType">REMOTE</property>
> </protocol>
> <configuration>
> <property name="jbossHome">target/jboss-as-7.1.0.Beta1</property>
> <property name="javaVmArguments">
> -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=y -Xmx512m -XX:MaxPermSize=128m
> </property>
> </configuration>
> </container>
> </arquillian>
> {code}
> given that often people use auto-formatting for xml the parser should take care of this and trim the configuration value. Also the resulting exception for the case where the value is on a new line is very confusing:
> {noformat}
> org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container
> at org.jboss.as.arquillian.container.managed.ManagedDeployableContainer.startInternal(ManagedDeployableContainer.java:180)
> at org.jboss.as.arquillian.container.CommonDeployableContainer.start(CommonDeployableContainer.java:78)
> at org.jboss.arquillian.container.impl.ContainerImpl.start(ContainerImpl.java:198)
> 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:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> 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:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
> 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:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
> 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:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeSuite(EventTestRunnerAdaptor.java:68)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:97)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
> at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> Caused by: java.util.concurrent.TimeoutException: Managed server was not started within [30] s
> at org.jboss.as.arquillian.container.managed.ManagedDeployableContainer.startInternal(ManagedDeployableContainer.java:176)
> ... 65 more
> {noformat}
--
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, 6 months
[JBoss JIRA] (ARQ-1345) maxTestClassesBeforeRestart causes more restarts than it should
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1345?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1345.
------------------------------
> maxTestClassesBeforeRestart causes more restarts than it should
> ---------------------------------------------------------------
>
> Key: ARQ-1345
> URL: https://issues.jboss.org/browse/ARQ-1345
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 1.0.3.Final
> Reporter: Rich DiCroce
> Assignee: Aslak Knutsen
> Fix For: 1.0.4.Final
>
>
> ContainerRestarter (package org.jboss.arquillian.container.test.impl.client.container) has a bug in it that causes maxTestClassesBeforeRestart to be evaluated slightly incorrectly. The below code is what the shouldRestart() method currently does:
> {code}
> ArquillianDescriptor descriptor = configuration.get();
> Integer maxTestClasses = descriptor.engine().getMaxTestClassesBeforeRestart();
> if(maxTestClasses == null)
> {
> return false;
> }
> if(maxTestClasses > -1)
> {
> if((maxTestClasses -1 ) == testClassesCount)
> {
> testClassesCount = 0;
> return true;
> }
> }
> testClassesCount++;
> return false;
> {code}
> Because it checks if maxTestClasses - 1 is equal to testClassesCount, the first container restart actually occurs before test #N-1, not test #N. An easy way to see this is to set maxTestClassesBeforeRestart to 1; you will observe that the container is started for the first time, then immediately shut down without anything being deployed, then restarted.
> This can be fixed by checking if maxTestClasses == testClassesCount instead of maxTestClasses - 1 == testClassesCount.
--
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, 6 months