IGNITE-3980: Processed failing tests in query suites. This closes #1137.

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

Branch: refs/heads/ignite-ssl-hotfix
Commit: bba019fd5076412ca43c10a32fd300b6031ccd0b
Parents: fa698d6
Author: vozerov-gridgain <voze...@gridgain.com>
Authored: Mon Oct 3 17:25:20 2016 +0300
Committer: vozerov-gridgain <voze...@gridgain.com>
Committed: Mon Oct 3 17:25:20 2016 +0300

----------------------------------------------------------------------
 .../ignite/testframework/IgniteTestSuite.java   | 18 +++++++--
 modules/ignored-tests/pom.xml                   |  8 ++++
 ...gniteIgnoredBinarySimpleMapperTestSuite.java | 41 +++++++++++++++++++
 .../IgniteIgnoredBinaryTestSuite.java           | 42 ++++++++++++++++++++
 .../testsuites/IgniteIgnoredTestSuite.java      |  4 ++
 .../IgniteCacheReplicatedQuerySelfTest.java     |  4 +-
 .../query/IgniteSqlSplitterSelfTest.java        |  4 +-
 .../query/h2/sql/BaseH2CompareQueryTest.java    |  3 +-
 ...narySimpleNameMapperCacheQueryTestSuite.java |  2 -
 .../IgniteCacheQuerySelfTestSuite.java          |  3 +-
 .../IgniteCacheQuerySelfTestSuite2.java         |  3 +-
 11 files changed, 119 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java
 
b/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java
index 1cf69ae..157e1f5 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/testframework/IgniteTestSuite.java
@@ -103,11 +103,21 @@ public class IgniteTestSuite extends TestSuite {
     }
 
     /** {@inheritDoc} */
-    @Override public void addTestSuite(Class<? extends TestCase> testClass) {
-        IgniteTestSuite suite = new IgniteTestSuite(testClass, ignoredOnly);
+    @Override public void addTest(Test test) {
+        // Ignore empty test suites.
+        if (test instanceof IgniteTestSuite) {
+            IgniteTestSuite suite = (IgniteTestSuite)test;
+
+            if (suite.testCount() == 0)
+                return;
+        }
 
-        if (suite.testCount() > 0)
-            addTest(suite);
+        super.addTest(test);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void addTestSuite(Class<? extends TestCase> testClass) {
+        addTest(new IgniteTestSuite(testClass, ignoredOnly));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/ignored-tests/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ignored-tests/pom.xml b/modules/ignored-tests/pom.xml
index 142754e..00c7d55 100644
--- a/modules/ignored-tests/pom.xml
+++ b/modules/ignored-tests/pom.xml
@@ -100,6 +100,14 @@
 
         <dependency>
             <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-indexing</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
             <artifactId>ignite-jta</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredBinarySimpleMapperTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredBinarySimpleMapperTestSuite.java
 
b/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredBinarySimpleMapperTestSuite.java
new file mode 100644
index 0000000..aa2e219
--- /dev/null
+++ 
b/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredBinarySimpleMapperTestSuite.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.testsuites;
+
+import junit.framework.TestSuite;
+import org.apache.ignite.testframework.IgniteTestSuite;
+
+/**
+ * Special test suite with ignored tests for Binary mode.
+ */
+public class IgniteIgnoredBinarySimpleMapperTestSuite extends TestSuite {
+    /**
+     * @return IgniteCache test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite() throws Exception {
+        IgniteTestSuite.ignoreDefault(true);
+
+        IgniteTestSuite suite = new IgniteTestSuite(null, "Ignite Ignored 
Binary Simple Mapper Test Suite");
+
+        /* --- QUERY --- */
+        suite.addTest(IgniteBinarySimpleNameMapperCacheQueryTestSuite.suite());
+
+        return suite;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredBinaryTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredBinaryTestSuite.java
 
b/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredBinaryTestSuite.java
new file mode 100644
index 0000000..5116bd7
--- /dev/null
+++ 
b/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredBinaryTestSuite.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.testsuites;
+
+import junit.framework.TestSuite;
+import org.apache.ignite.testframework.IgniteTestSuite;
+
+/**
+ * Special test suite with ignored tests for Binary mode.
+ */
+public class IgniteIgnoredBinaryTestSuite extends TestSuite {
+    /**
+     * @return IgniteCache test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite() throws Exception {
+        IgniteTestSuite.ignoreDefault(true);
+
+        IgniteTestSuite suite = new IgniteTestSuite(null, "Ignite Ignored 
Binary Test Suite");
+
+        /* --- QUERY --- */
+        suite.addTest(IgniteBinaryCacheQueryTestSuite.suite());
+        suite.addTest(IgniteBinaryCacheQueryTestSuite2.suite());
+
+        return suite;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
 
b/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
index fd92a35..414d166 100644
--- 
a/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
+++ 
b/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
@@ -46,6 +46,10 @@ public class IgniteIgnoredTestSuite extends TestSuite {
         /* --- JTA --- */
         suite.addTest(IgniteJtaTestSuite.suite());
 
+        /* --- QUERIES --- */
+        suite.addTest(IgniteCacheQuerySelfTestSuite.suite());
+        suite.addTest(IgniteCacheQuerySelfTestSuite2.suite());
+
         /* --- SPRING --- */
         suite.addTest(IgniteSpringTestSuite.suite());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
index 06adb68..a673a73 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedQuerySelfTest.java
@@ -53,6 +53,7 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testsuites.IgniteIgnore;
 import org.apache.ignite.transactions.Transaction;
 import org.springframework.util.ReflectionUtils;
 
@@ -354,9 +355,8 @@ public class IgniteCacheReplicatedQuerySelfTest extends 
IgniteCacheAbstractQuery
     /**
      * @throws Exception If failed.
      */
+    @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-613";, 
forceFailure = true)
     public void testNodeLeft() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-613";);
-
         Ignite g = startGrid("client");
 
         try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
index fd52469..64be936 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
@@ -39,6 +39,7 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.testsuites.IgniteIgnore;
 
 /**
  * Tests for correct distributed partitioned queries.
@@ -281,9 +282,8 @@ public class IgniteSqlSplitterSelfTest extends 
GridCommonAbstractTest {
     /**
      *
      */
+    @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-1886";, 
forceFailure = true)
     public void testFunctionNpe() {
-        assert false : "https://issues.apache.org/jira/browse/IGNITE-1886";;
-
         IgniteCache<Integer, User> userCache = ignite(0).createCache(
             cacheConfig("UserCache", true, Integer.class, User.class));
         IgniteCache<Integer, UserOrder> userOrderCache = ignite(0).createCache(

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
index 46076a9..7cae585 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
@@ -37,6 +37,7 @@ import 
org.apache.ignite.cache.query.annotations.QuerySqlField;
 import org.apache.ignite.cache.query.annotations.QuerySqlFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testsuites.IgniteIgnore;
 
 /**
  * Base set of queries to compare query results from h2 database instance and 
mixed ignite caches (replicated and partitioned)
@@ -204,8 +205,8 @@ public class BaseH2CompareQueryTest extends 
AbstractH2CompareQueryTest {
     /**
      * @throws Exception
      */
+    @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-705";, 
forceFailure = true)
     public void testAllExamples() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-705";);
 //        compareQueryRes0("select ? limit ? offset ?");
 
 //        compareQueryRes0("select cool1()");

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java
 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java
index 3eed980..109e244 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperCacheQueryTestSuite.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.testframework.config.GridTestProperties;
 
 /**
@@ -30,7 +29,6 @@ public class IgniteBinarySimpleNameMapperCacheQueryTestSuite 
extends TestSuite {
      * @throws Exception In case of error.
      */
     public static TestSuite suite() throws Exception {
-        GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, 
BinaryMarshaller.class.getName());
         
GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER,
 "true");
 
         return IgniteBinaryCacheQueryTestSuite.suite();

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 2174147..d1f4c4a 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -65,6 +65,7 @@ import 
org.apache.ignite.internal.processors.cache.query.IndexingSpiQueryTxSelfT
 import org.apache.ignite.internal.processors.query.IgniteSqlSchemaIndexingTest;
 import org.apache.ignite.internal.processors.query.IgniteSqlSplitterSelfTest;
 import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest;
+import org.apache.ignite.testframework.IgniteTestSuite;
 
 /**
  * Test suite for cache queries.
@@ -75,7 +76,7 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
      * @throws Exception If failed.
      */
     public static TestSuite suite() throws Exception {
-        TestSuite suite = new TestSuite("Ignite Cache Queries Test Suite");
+        IgniteTestSuite suite = new IgniteTestSuite("Ignite Cache Queries Test 
Suite");
 
         // Parsing
         suite.addTestSuite(GridQueryParsingTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/bba019fd/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
----------------------------------------------------------------------
diff --git 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
index e5f4027..40fc157 100644
--- 
a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
+++ 
b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
@@ -47,6 +47,7 @@ import 
org.apache.ignite.internal.processors.cache.reducefields.GridCacheReduceF
 import 
org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest;
 import 
org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest;
 import 
org.apache.ignite.spi.communication.tcp.GridOrderedMessageCancelSelfTest;
+import org.apache.ignite.testframework.IgniteTestSuite;
 
 /**
  * Test suite for cache queries.
@@ -57,7 +58,7 @@ public class IgniteCacheQuerySelfTestSuite2 extends TestSuite 
{
      * @throws Exception If failed.
      */
     public static TestSuite suite() throws Exception {
-        TestSuite suite = new TestSuite("Ignite Cache Queries Test Suite 2");
+        TestSuite suite = new IgniteTestSuite("Ignite Cache Queries Test Suite 
2");
 
         // Scan queries.
         suite.addTestSuite(CacheScanPartitionQueryFallbackSelfTest.class);

Reply via email to