This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-rules.git
commit eafe1a136bf8669d16b29e13ecf467ce8e1f3780 Author: Andrei Dulvac <[email protected]> AuthorDate: Tue Jul 12 12:07:27 2016 +0000 SLING-5803 FilterRuleExcludeCategoryIgnoreIfTest fails on Jenkins * Added an assumption that the system property is still there for test git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1752284 13f79535-47bb-0310-9956-ffa450edef68 --- .../rules/util/filterrule/FilterRuleExcludeCategoryIgnoreIfTest.java | 3 +++ .../junit/rules/util/filterrule/FilterRuleExcludeCategoryTest.java | 2 ++ .../rules/util/filterrule/FilterRuleIncludeCategoryIgnoreIfTest.java | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleExcludeCategoryIgnoreIfTest.java b/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleExcludeCategoryIgnoreIfTest.java index 360ca6b..a542b84 100644 --- a/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleExcludeCategoryIgnoreIfTest.java +++ b/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleExcludeCategoryIgnoreIfTest.java @@ -23,11 +23,13 @@ import org.apache.sling.testing.junit.rules.category.FailingTest; import org.apache.sling.testing.junit.rules.category.SlowRunningTest; import org.apache.sling.testing.junit.rules.util.IgnoreTestsConfig; import org.junit.Assert; +import org.junit.Assume; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.rules.TestName; +//TODO use a better way to test this public class FilterRuleExcludeCategoryIgnoreIfTest { @Rule @@ -92,6 +94,7 @@ public class FilterRuleExcludeCategoryIgnoreIfTest { @Test @Category(Issue.class) public void testExcludedCategoryExists() { + Assume.assumeTrue(System.getProperty(FilterRule.CATEGORY_PROPERTY).equals("Issue,SlowRunningTest")); Assert.fail("Test should be Ignored"); } diff --git a/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleExcludeCategoryTest.java b/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleExcludeCategoryTest.java index a2bdb87..ddc2de4 100644 --- a/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleExcludeCategoryTest.java +++ b/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleExcludeCategoryTest.java @@ -22,6 +22,7 @@ import org.apache.sling.testing.junit.rules.annotation.Issue; import org.apache.sling.testing.junit.rules.category.FailingTest; import org.apache.sling.testing.junit.rules.util.IgnoreTestsConfig; import org.junit.Assert; +import org.junit.Assume; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -79,6 +80,7 @@ public class FilterRuleExcludeCategoryTest { @Test @Category(Issue.class) public void testExcludedCategoryExists() { + Assume.assumeTrue(System.getProperty(FilterRule.CATEGORY_PROPERTY).equals("Issue")); Assert.fail("Test should be Ignored"); } diff --git a/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleIncludeCategoryIgnoreIfTest.java b/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleIncludeCategoryIgnoreIfTest.java index 3060fcb..84591a2 100644 --- a/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleIncludeCategoryIgnoreIfTest.java +++ b/src/test/java/org/apache/sling/testing/junit/rules/util/filterrule/FilterRuleIncludeCategoryIgnoreIfTest.java @@ -70,7 +70,7 @@ public class FilterRuleIncludeCategoryIgnoreIfTest { @Test @IgnoreIfProperty(name = "test.filterrule.a", value = "a") @Category(FailingTest.class) - public void testIgnoreIfPropExixtsandIncludedCategoryNotExists() { + public void testIgnoreIfPropExistsandIncludedCategoryNotExists() { Assert.fail("Test should be Ignored"); } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
