Permalink
Browse files

ARQ-362 Support @Run on Class and Method level.

@Run no longer controls packaging, packaging is controlled via @Deployment(testable)

@Run on class level will override all default behavior unless a method level @Run is specified which will override class level.

Default behavior will follow @Deployment(testable), if true IN_CONTAINER else AS_CLIENT.

A testable Archive can be executed both as IN_CONTAINER and AS_CLIENT, a none testable Archive can only be executed AS_CLIENT. Defining a non testable deployment with a Method/Class targeted for IN_CONTAINER cause a RuntimeException.
  • Loading branch information...
1 parent 6316df1 commit d8ce0c974a5cfe06d17af4c5f8f975de29b2e45b @aslakknutsen aslakknutsen committed Feb 4, 2011
@@ -16,14 +16,11 @@
*/
package org.jboss.arquillian.container.jetty.embedded_6_1;
-import static org.jboss.arquillian.api.RunModeType.AS_CLIENT;
-
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URL;
import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.api.Run;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
@@ -42,13 +39,12 @@
* @version $Revision: $
*/
@RunWith(Arquillian.class)
-@Run(AS_CLIENT)
public class JettyEmbeddedClientTestCase
{
/**
* Deployment for the test
*/
- @Deployment
+ @Deployment(testable = false)
public static WebArchive getTestArchive()
{
return ShrinkWrap.create(WebArchive.class, "client-test.war")
@@ -16,14 +16,11 @@
*/
package org.jboss.arquillian.container.jetty.embedded_7;
-import static org.jboss.arquillian.api.RunModeType.AS_CLIENT;
-
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URL;
import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.api.Run;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
@@ -42,13 +39,12 @@
* @version $Revision: $
*/
@RunWith(Arquillian.class)
-@Run(AS_CLIENT)
public class JettyEmbeddedClientTestCase
{
/**
* Deployment for the test
*/
- @Deployment
+ @Deployment(testable = false)
public static WebArchive getTestArchive()
{
return ShrinkWrap.create(WebArchive.class, "client-test.war")

0 comments on commit d8ce0c9

Please sign in to comment.