deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject git commit: DELTASPIKE-399 Modified test to not run in TomEE until TOMEE-1101 is resolved.
Date Sun, 29 Dec 2013 17:21:39 GMT
Updated Branches:
  refs/heads/master 2b7896eb8 -> 64e230381


DELTASPIKE-399 Modified test to not run in TomEE until TOMEE-1101 is resolved.


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/64e23038
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/64e23038
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/64e23038

Branch: refs/heads/master
Commit: 64e230381022b0e05b3e0ed10233e59a95d6d96e
Parents: 2b7896e
Author: John D. Ament <john.d.ament@gmail.com>
Authored: Sun Dec 29 12:21:11 2013 -0500
Committer: John D. Ament <john.d.ament@gmail.com>
Committed: Sun Dec 29 12:21:11 2013 -0500

----------------------------------------------------------------------
 .../core/impl/resourceloader/ClasspathWebProfileTest.java    | 8 ++++++--
 .../apache/deltaspike/test/utils/CdiContainerUnderTest.java  | 5 +++++
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/64e23038/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/resourceloader/ClasspathWebProfileTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/resourceloader/ClasspathWebProfileTest.java
b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/resourceloader/ClasspathWebProfileTest.java
index 1f3b76e..50bead2 100644
--- a/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/resourceloader/ClasspathWebProfileTest.java
+++ b/deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/impl/resourceloader/ClasspathWebProfileTest.java
@@ -22,6 +22,7 @@ import org.apache.deltaspike.core.api.resourceloader.ClasspathStorage;
 import org.apache.deltaspike.core.api.resourceloader.ExternalResource;
 import org.apache.deltaspike.test.category.WebProfileCategory;
 import org.apache.deltaspike.test.util.ArchiveUtils;
+import org.apache.deltaspike.test.utils.CdiContainerUnderTest;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.shrinkwrap.api.Archive;
@@ -30,6 +31,7 @@ import org.jboss.shrinkwrap.api.asset.EmptyAsset;
 import org.jboss.shrinkwrap.api.asset.StringAsset;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
@@ -85,14 +87,16 @@ public class ClasspathWebProfileTest
     public void testAmbiguousFileLookup(@ExternalResource(storage=ClasspathStorage.class,
             location="META-INF/beans.xml") InputStream inputStream)
     {
-        // for some reason, this works
-        Assert.assertNull(inputStream);
+        Assume.assumeTrue(CdiContainerUnderTest.isNotTomEE()); // don't run in TomEE until
TOMEE-1101 is fixed.
+        Assert.assertNull(inputStream); // for some reason, this works, exception no longer
thrown.
     }
 
     @Test
     public void testSuccessfulAmbiguousLookup(@ExternalResource(storage = ClasspathStorage.class,
             location="META-INF/beans.xml") List<InputStream> inputStreams)
     {
+        Assume.assumeTrue(CdiContainerUnderTest.isNotTomEE()); // don't run in TomEE until
TOMEE-1101 is fixed.
         Assert.assertTrue(inputStreams.size() > 1); //the count is different on as7 compared
to the standalone setup
     }
+
 }

http://git-wip-us.apache.org/repos/asf/deltaspike/blob/64e23038/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/CdiContainerUnderTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/CdiContainerUnderTest.java
b/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/CdiContainerUnderTest.java
index a9c7cd2..d39471c 100644
--- a/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/CdiContainerUnderTest.java
+++ b/deltaspike/test-utils/src/main/java/org/apache/deltaspike/test/utils/CdiContainerUnderTest.java
@@ -193,4 +193,9 @@ public class CdiContainerUnderTest
             }
         }
     }
+
+    public static boolean isNotTomEE()
+    {
+        return !System.getProperty("cdicontainer.version").startsWith("tomee");
+    }
 }


Mime
View raw message