ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/9] ignite git commit: IGNITE-3661: First attempt to move ignored and flaky tests into a single suite. Applied to web-session module.
Date Tue, 27 Sep 2016 15:18:38 GMT
IGNITE-3661: First attempt to move ignored and flaky tests into a single suite. Applied to
web-session module.


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

Branch: refs/heads/ignite-3601p
Commit: 5cffd3c3d6cb006e3745c314d6f85a066e6a0f06
Parents: 39fc547
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Tue Sep 27 15:13:21 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Tue Sep 27 15:13:21 2016 +0300

----------------------------------------------------------------------
 .../ignite/testframework/IgniteTestSuite.java   | 122 ++++++++++++++-----
 .../testframework/junits/GridAbstractTest.java  |  22 +++-
 .../apache/ignite/testsuites/IgniteIgnore.java  |  11 +-
 .../testsuites/IgniteIgnoredTestSuite.java      |  63 ----------
 modules/ignored-tests/README.txt                |   4 +
 modules/ignored-tests/pom.xml                   |  93 ++++++++++++++
 .../testsuites/IgniteIgnoredTestSuite.java      |  50 ++++++++
 .../apache/ignite/testsuites/package-info.java  |  22 ++++
 .../IgniteWebSessionSelfTestSuite.java          |  68 +----------
 .../WebSessionReplicatedSelfTest.java           |  28 +++++
 .../WebSessionReplicatedV1SelfTest.java         |  28 +++++
 .../internal/websession/WebSessionSelfTest.java |   2 +
 .../WebSessionTransactionalSelfTest.java        |  48 ++++++++
 .../WebSessionTransactionalV1SelfTest.java      |  28 +++++
 .../websession/WebSessionV1SelfTest.java        |  28 +++++
 pom.xml                                         |   7 ++
 16 files changed, 459 insertions(+), 165 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/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 2828065..4153600 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
@@ -20,6 +20,8 @@ package org.apache.ignite.testframework;
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.testframework.junits.GridAbstractTest;
 import org.apache.ignite.testsuites.IgniteIgnore;
 import org.jetbrains.annotations.Nullable;
 import org.junit.internal.MethodSorter;
@@ -94,16 +96,6 @@ public class IgniteTestSuite extends TestSuite {
 
     /** {@inheritDoc} */
     @Override public void addTestSuite(Class<? extends TestCase> testClass) {
-        addTestSuite(testClass, false);
-    }
-
-    /**
-     * Add test class to the suite.
-     *
-     * @param testClass Test class.
-     * @param ignoredOnly Ignore only flag.
-     */
-    public void addTestSuite(Class<? extends TestCase> testClass, boolean ignoredOnly)
{
         addTest(new IgniteTestSuite(testClass, ignoredOnly));
     }
 
@@ -133,6 +125,7 @@ public class IgniteTestSuite extends TestSuite {
 
             for(List<String> names = new ArrayList<>(); Test.class.isAssignableFrom(superCls);
                 superCls = superCls.getSuperclass()) {
+
                 Method[] methods = MethodSorter.getDeclaredMethods(superCls);
 
                 for (Method each : methods) {
@@ -147,45 +140,110 @@ public class IgniteTestSuite extends TestSuite {
     }
 
     /**
-     * @param method test method
-     * @param names test name list
-     * @param theClass test class
+     * Add test method.
+     *
+     * @param m Test method.
+     * @param names Test name list.
+     * @param theClass Test class.
+     * @return Whether test method was added.
      */
-    private boolean addTestMethod(Method method, List<String> names, Class<?>
theClass) {
-        String name = method.getName();
+    private boolean addTestMethod(Method m, List<String> names, Class<?> theClass)
{
+        String name = m.getName();
+
+        if (names.contains(name))
+            return false;
+
+        if (!isPublicTestMethod(m)) {
+            if (isTestMethod(m))
+                addTest(warning("Test method isn't public: " + m.getName() + "(" + theClass.getCanonicalName()
+ ")"));
+
+            return false;
+        }
+
+        names.add(name);
+
+        boolean hasIgnore = m.isAnnotationPresent(IgniteIgnore.class);
+
+        if (ignoredOnly) {
+            if (hasIgnore) {
+                IgniteIgnore ignore = m.getAnnotation(IgniteIgnore.class);
+
+                String reason = ignore.value();
+
+                if (F.isEmpty(reason))
+                    throw new IllegalArgumentException("Reason is not set for ignored test
[class=" +
+                        theClass.getName() + ", method=" + name + ']');
 
-        if(!names.contains(name) && canAddMethod(method)) {
-            if(!Modifier.isPublic(method.getModifiers()))
-                addTest(warning("Test method isn\'t public: " + method.getName() + "(" +
-                    theClass.getCanonicalName() + ")"));
-            else {
-                names.add(name);
+                Test test = createTest(theClass, name);
 
+                if (ignore.forceFailure()) {
+                    if (test instanceof GridAbstractTest)
+                        ((GridAbstractTest)test).forceFailure(ignore.value());
+                    else
+                        test = new ForcedFailure(name, ignore.value());
+                }
+
+                addTest(test);
+
+                return true;
+            }
+        }
+        else {
+            if (!hasIgnore) {
                 addTest(createTest(theClass, name));
 
                 return true;
             }
         }
+
         return false;
     }
 
     /**
-     * Check whether method should be ignored.
+     * Check whether this is a test method.
      *
-     * @param method Method.
-     * @return {@code True} if it should be ignored.
+     * @param m Method.
+     * @return {@code True} if this is a test method.
      */
-    protected boolean canAddMethod(Method method) {
-        boolean res = method.getParameterTypes().length == 0 && method.getName().startsWith("test")
-            && method.getReturnType().equals(Void.TYPE);
+    private static boolean isTestMethod(Method m) {
+        return m.getParameterTypes().length == 0 &&
+            m.getName().startsWith("test") &&
+            m.getReturnType().equals(Void.TYPE);
+    }
 
-        if (res) {
-            // If method signature and name matches check if it is ignored or not.
-            boolean hasIgnore = method.isAnnotationPresent(IgniteIgnore.class);
+    /**
+     * Check whether this is a public test method.
+     *
+     * @param m Method.
+     * @return {@code True} if this is a public test method.
+     */
+    private static boolean isPublicTestMethod(Method m) {
+        return isTestMethod(m) && Modifier.isPublic(m.getModifiers());
+    }
 
-            res = hasIgnore == ignoredOnly;
+    /**
+     * Test case simulating failure.
+     */
+    private static class ForcedFailure extends TestCase {
+        /** Message. */
+        private final String msg;
+
+        /**
+         * Constructor.
+         *
+         * @param name Name.
+         * @param msg  Message.
+         */
+        private ForcedFailure(String name, String msg) {
+            super(name);
+
+            this.msg = msg;
         }
 
-        return res;
+        /** {@inheritDoc} */
+        @Override protected void runTest() {
+            fail("Forced failure: " + msg + " (extend " + GridAbstractTest.class.getSimpleName()
+
+                " for better output).");
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
index 3910ce4..8d6fd07 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
@@ -155,6 +155,12 @@ public abstract class GridAbstractTest extends TestCase {
     /** Starting grid name. */
     protected static final ThreadLocal<String> startingGrid = new ThreadLocal<>();
 
+    /** Force failure flag. */
+    private boolean forceFailure;
+
+    /** Force failure message. */
+    private String forceFailureMsg;
+
     /**
      *
      */
@@ -1753,11 +1759,25 @@ public abstract class GridAbstractTest extends TestCase {
     }
 
     /**
+     * Force test failure.
+     *
+     * @param msg Message.
+     */
+    public void forceFailure(@Nullable String msg) {
+        forceFailure = true;
+
+        forceFailureMsg = msg;
+    }
+
+    /**
      * @throws Throwable If failed.
      */
     @SuppressWarnings({"ProhibitedExceptionDeclared"})
     private void runTestInternal() throws Throwable {
-        super.runTest();
+        if (forceFailure)
+            fail("Forced failure: " + forceFailureMsg);
+        else
+            super.runTest();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgnore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgnore.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgnore.java
index ac9a885..dbb1d7a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgnore.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgnore.java
@@ -26,10 +26,15 @@ import java.lang.annotation.Target;
  * Annotation which indicates that the test is ignored.
  */
 @Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.METHOD, ElementType.TYPE})
+@Target({ElementType.METHOD})
 public @interface IgniteIgnore {
     /**
-     * The optional reason why the test is ignored.
+     * Reason for ignore (usually link to JIRA ticket).
      */
-    String value() default "";
+    String value();
+
+    /**
+     * Whether test should be failed immediately. Useful when test hangs or consumes a lot
of time.
+     */
+    boolean forceFailure() default false;
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
deleted file mode 100644
index c3ec5e4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- * Special test suite with ignored tests.
- */
-public class IgniteIgnoredTestSuite extends TestSuite {
-    /**
-     * @return IgniteCache test suite.
-     * @throws Exception Thrown in case of the failure.
-     */
-    public static TestSuite suite() throws Exception {
-        IgniteTestSuite suite = new IgniteTestSuite("Ignite Ignored Test Suite");
-
-        suite.addTestSuite(SampleTestClass.class, true);
-
-        return suite;
-    }
-
-    /**
-     * Sample test class. To be removed once the very first really ignored test class is
there.
-     */
-    public static class SampleTestClass extends GridCommonAbstractTest {
-        /**
-         * Test 1.
-         *
-         * @throws Exception If failed.
-         */
-        public void testMethod1() throws Exception {
-            System.out.println("Normal test method called.");
-        }
-
-        /**
-         * Test 2.
-         *
-         * @throws Exception If failed.
-         */
-        @IgniteIgnore
-        public void testMethod2() throws Exception {
-            System.out.println("Ignored method called.");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/ignored-tests/README.txt
----------------------------------------------------------------------
diff --git a/modules/ignored-tests/README.txt b/modules/ignored-tests/README.txt
new file mode 100644
index 0000000..70f728d
--- /dev/null
+++ b/modules/ignored-tests/README.txt
@@ -0,0 +1,4 @@
+Apache Ignite Ignored Tests
+------------------------
+
+Special module containing ignored and flaky tests grouped in a single test suite.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/ignored-tests/pom.xml
----------------------------------------------------------------------
diff --git a/modules/ignored-tests/pom.xml b/modules/ignored-tests/pom.xml
new file mode 100644
index 0000000..a82a5bb
--- /dev/null
+++ b/modules/ignored-tests/pom.xml
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  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.
+-->
+
+<!--
+    POM file.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.ignite</groupId>
+        <artifactId>ignite-parent</artifactId>
+        <version>1</version>
+        <relativePath>../../parent</relativePath>
+    </parent>
+
+    <artifactId>ignite-ignored-tests</artifactId>
+    <version>1.7.0-SNAPSHOT</version>
+    <url>http://ignite.apache.org</url>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-core</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-log4j</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-spring</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-web</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.ignite</groupId>
+            <artifactId>ignite-web</artifactId>
+            <version>${project.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-servlets</artifactId>
+            <version>${jetty.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-webapp</artifactId>
+            <version>${jetty.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/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
new file mode 100644
index 0000000..f6ce3e3
--- /dev/null
+++ b/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/IgniteIgnoredTestSuite.java
@@ -0,0 +1,50 @@
+/*
+ * 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.internal.websession.WebSessionReplicatedSelfTest;
+import org.apache.ignite.internal.websession.WebSessionReplicatedV1SelfTest;
+import org.apache.ignite.internal.websession.WebSessionSelfTest;
+import org.apache.ignite.internal.websession.WebSessionTransactionalSelfTest;
+import org.apache.ignite.internal.websession.WebSessionTransactionalV1SelfTest;
+import org.apache.ignite.internal.websession.WebSessionV1SelfTest;
+import org.apache.ignite.testframework.IgniteTestSuite;
+
+/**
+ * Special test suite with ignored tests.
+ */
+public class IgniteIgnoredTestSuite extends TestSuite {
+    /**
+     * @return IgniteCache test suite.
+     * @throws Exception Thrown in case of the failure.
+     */
+    public static TestSuite suite() throws Exception {
+        IgniteTestSuite suite = new IgniteTestSuite(null, "Ignite Ignored Test Suite", true);
+
+        /* --- WEB SESSIONS --- */
+        suite.addTestSuite(WebSessionSelfTest.class);
+        suite.addTestSuite(WebSessionTransactionalSelfTest.class);
+        suite.addTestSuite(WebSessionReplicatedSelfTest.class);
+        suite.addTestSuite(WebSessionV1SelfTest.class);
+        suite.addTestSuite(WebSessionTransactionalV1SelfTest.class);
+        suite.addTestSuite(WebSessionReplicatedV1SelfTest.class);
+
+        return suite;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/package-info.java
----------------------------------------------------------------------
diff --git a/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/package-info.java
b/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/package-info.java
new file mode 100644
index 0000000..cb71478
--- /dev/null
+++ b/modules/ignored-tests/src/test/java/org/apache/ignite/testsuites/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * 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 description. -->
+ * Contains internal tests or test related classes and interfaces.
+ */
+package org.apache.ignite.testsuites;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java
b/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java
index 1d15127..e1d5c3b 100644
--- a/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.websession;
 
 import junit.framework.TestSuite;
 import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.IgniteTestSuite;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP;
 
@@ -32,7 +33,7 @@ public class IgniteWebSessionSelfTestSuite extends TestSuite {
      * @throws Exception Thrown in case of the failure.
      */
     public static TestSuite suite() throws Exception {
-        TestSuite suite = new TestSuite("Ignite Web Sessions Test Suite");
+        TestSuite suite = new IgniteTestSuite("Ignite Web Sessions Test Suite");
 
         suite.addTestSuite(WebSessionSelfTest.class);
         suite.addTestSuite(WebSessionTransactionalSelfTest.class);
@@ -48,69 +49,4 @@ public class IgniteWebSessionSelfTestSuite extends TestSuite {
 
         return suite;
     }
-
-    /**
-     * Tests web sessions with TRANSACTIONAL cache.
-     */
-    public static class WebSessionTransactionalSelfTest extends WebSessionSelfTest {
-        /** {@inheritDoc} */
-        @Override protected String getCacheName() {
-            return "partitioned_tx";
-        }
-
-        /** {@inheritDoc} */
-        @Override public void testRestarts() throws Exception {
-            fail("https://issues.apache.org/jira/browse/IGNITE-810");
-        }
-
-        /** {@inheritDoc} */
-        @Override public void testInvalidatedSession() throws Exception {
-            fail("https://issues.apache.org/jira/browse/IGNITE-810");
-        }
-
-        /** {@inheritDoc} */
-        @Override public void testClientReconnectRequest() throws Exception {
-            fail("https://issues.apache.org/jira/browse/IGNITE-810");
-        }
-    }
-
-    /**
-     * Tests web sessions with REPLICATED cache.
-     */
-    public static class WebSessionReplicatedSelfTest extends WebSessionSelfTest {
-        /** {@inheritDoc} */
-        @Override protected String getCacheName() {
-            return "replicated";
-        }
-    }
-
-    /**
-     * Old version test.
-     */
-    public static class WebSessionV1SelfTest extends WebSessionSelfTest {
-        /** {@inheritDoc} */
-        @Override protected boolean keepBinary() {
-            return false;
-        }
-    }
-
-    /**
-     * Tests web sessions with TRANSACTIONAL cache in compatibility mode.
-     */
-    public static class WebSessionTransactionalV1SelfTest extends WebSessionTransactionalSelfTest
{
-        /** {@inheritDoc} */
-        @Override protected boolean keepBinary() {
-            return false;
-        }
-    }
-
-    /**
-     * Tests web sessions with REPLICATED cache in compatibility mode.
-     */
-    public static class WebSessionReplicatedV1SelfTest extends WebSessionReplicatedSelfTest
{
-        /** {@inheritDoc} */
-        @Override protected boolean keepBinary() {
-            return false;
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionReplicatedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionReplicatedSelfTest.java
b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionReplicatedSelfTest.java
new file mode 100644
index 0000000..638fdcc
--- /dev/null
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionReplicatedSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.internal.websession;
+
+/**
+ * Tests web sessions with REPLICATED cache.
+ */
+public class WebSessionReplicatedSelfTest extends WebSessionSelfTest {
+    /** {@inheritDoc} */
+    @Override protected String getCacheName() {
+        return "replicated";
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionReplicatedV1SelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionReplicatedV1SelfTest.java
b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionReplicatedV1SelfTest.java
new file mode 100644
index 0000000..ba69d13
--- /dev/null
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionReplicatedV1SelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.internal.websession;
+
+/**
+ * Tests web sessions with REPLICATED cache in compatibility mode.
+ */
+public class WebSessionReplicatedV1SelfTest extends WebSessionReplicatedSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean keepBinary() {
+        return false;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
index 0ab1130..5138e3a 100644
--- a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java
@@ -46,6 +46,7 @@ import org.apache.ignite.marshaller.Marshaller;
 import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.testsuites.IgniteIgnore;
 import org.eclipse.jetty.security.HashLoginService;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.servlet.ServletHolder;
@@ -88,6 +89,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
+    @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-3663")
     public void testSessionRenewalDuringLogin() throws Exception {
         testSessionRenewalDuringLogin("/modules/core/src/test/config/websession/example-cache.xml");
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionTransactionalSelfTest.java
b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionTransactionalSelfTest.java
new file mode 100644
index 0000000..4cc1a63
--- /dev/null
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionTransactionalSelfTest.java
@@ -0,0 +1,48 @@
+/*
+ * 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.internal.websession;
+
+import org.apache.ignite.testsuites.IgniteIgnore;
+
+/**
+ * Tests web sessions with TRANSACTIONAL cache.
+ */
+public class WebSessionTransactionalSelfTest extends WebSessionSelfTest {
+    /** {@inheritDoc} */
+    @Override protected String getCacheName() {
+        return "partitioned_tx";
+    }
+
+    /** {@inheritDoc} */
+    @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-810", forceFailure
= true)
+    @Override public void testRestarts() throws Exception {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-810", forceFailure
= true)
+    @Override public void testInvalidatedSession() throws Exception {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-810", forceFailure
= true)
+    @Override public void testClientReconnectRequest() throws Exception {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionTransactionalV1SelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionTransactionalV1SelfTest.java
b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionTransactionalV1SelfTest.java
new file mode 100644
index 0000000..6f94471
--- /dev/null
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionTransactionalV1SelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.internal.websession;
+
+/**
+ * Tests web sessions with TRANSACTIONAL cache in compatibility mode.
+ */
+public class WebSessionTransactionalV1SelfTest extends WebSessionTransactionalSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean keepBinary() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionV1SelfTest.java
----------------------------------------------------------------------
diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionV1SelfTest.java
b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionV1SelfTest.java
new file mode 100644
index 0000000..791bec0
--- /dev/null
+++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionV1SelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.internal.websession;
+
+/**
+ * Tests the correctness of web sessions caching functionality in compatibility mode.
+ */
+public class WebSessionV1SelfTest extends WebSessionSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean keepBinary() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/5cffd3c3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2c7bad1..36051b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -496,6 +496,13 @@
         </profile>
 
         <profile>
+            <id>ignored-tests</id>
+            <modules>
+                <module>modules/ignored-tests</module>
+            </modules>
+        </profile>
+
+        <profile>
             <id>examples</id>
             <modules>
                 <module>examples</module>


Mime
View raw message