ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [20/39] ignite git commit: IGNITE-4947 - Merged Basic and Binary Basic suites. Closes #1991
Date Fri, 26 May 2017 14:06:20 GMT
IGNITE-4947 - Merged Basic and Binary Basic suites. Closes #1991


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

Branch: refs/heads/ignite-5075-cc-debug
Commit: af026d1efa482728f1ee78a8d3aa54c2162233f5
Parents: ffb4f3c
Author: Dmitry Pavlov <dpavlov.spb@gmail.com>
Authored: Thu May 25 10:21:37 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu May 25 10:23:11 2017 +0300

----------------------------------------------------------------------
 ...iteMarshallerCacheClassNameConflictTest.java |  9 +--
 .../ignite/testframework/GridTestUtils.java     |  6 +-
 .../config/GridTestProperties.java              |  3 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java | 13 ++--
 .../testsuites/IgniteBinaryBasicTestSuite.java  | 75 +-------------------
 ...iteBinarySimpleNameMapperBasicTestSuite.java |  3 +-
 6 files changed, 25 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/af026d1e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java
index d2a304d..6545a4e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteMarshallerCacheClassNameConflictTest.java
@@ -36,6 +36,7 @@ import org.apache.ignite.spi.discovery.DiscoverySpiListener;
 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.config.GridTestProperties;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jetbrains.annotations.Nullable;
 
@@ -108,7 +109,7 @@ public class IgniteMarshallerCacheClassNameConflictTest extends GridCommonAbstra
         final AtomicInteger trickCompilerVar = new AtomicInteger(1);
 
         final Organization aOrg1 = new Organization(1, "Microsoft", "One Microsoft Way Redmond,
WA 98052-6399, USA");
-        final OrganizatioN bOrg2 = new OrganizatioN(2, "Apple", "1 Infinite Loop, Cupertino,
CA 95014, USA");
+        final Organization_D4pss2X99lE bOrg2 = new Organization_D4pss2X99lE(2, "Apple", "1
Infinite Loop, Cupertino, CA 95014, USA");
 
         exec1.submit(new Runnable() {
             @Override public void run() {
@@ -206,7 +207,7 @@ public class IgniteMarshallerCacheClassNameConflictTest extends GridCommonAbstra
                             rejectObserved = true;
                             if (conflClsName.contains("Organization"))
                                 bbClsRejected = true;
-                            else if (conflClsName.contains("OrganizatioN"))
+                            else if (conflClsName.contains("Organization_D4pss2X99lE"))
                                 aaClsRejected = true;
                         }
                     }
@@ -254,7 +255,7 @@ public class IgniteMarshallerCacheClassNameConflictTest extends GridCommonAbstra
     /**
      * Class name is chosen to be in conflict with other class name this test put to cache.
      */
-    private static class OrganizatioN {
+    private static class Organization_D4pss2X99lE {
         /** */
         private final int id;
 
@@ -269,7 +270,7 @@ public class IgniteMarshallerCacheClassNameConflictTest extends GridCommonAbstra
          * @param name Name.
          * @param addr Address.
          */
-        OrganizatioN(int id, String name, String addr) {
+        Organization_D4pss2X99lE(int id, String name, String addr) {
             this.id = id;
             this.name = name;
             this.addr = addr;

http://git-wip-us.apache.org/repos/asf/ignite/blob/af026d1e/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
index 8559b97..46d97a0 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
@@ -59,6 +59,7 @@ import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
 import junit.framework.Test;
+import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
@@ -1848,9 +1849,10 @@ public final class GridTestUtils {
      *
      * @param suite TestSuite where to place the test.
      * @param test Test.
-     * @param ignoredTests Tests to ignore.
+     * @param ignoredTests Tests to ignore. If test contained in the collection it is not
included in suite
      */
-    public static void addTestIfNeeded(TestSuite suite, Class test, Set<Class> ignoredTests)
{
+    public static void addTestIfNeeded(@NotNull final TestSuite suite, @NotNull final Class<?
extends TestCase> test,
+        @Nullable final Collection<Class> ignoredTests) {
         if (ignoredTests != null && ignoredTests.contains(test))
             return;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/af026d1e/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
b/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
index 6d1c3e6..ec7e99b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/config/GridTestProperties.java
@@ -29,6 +29,7 @@ import java.util.Properties;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.apache.ignite.binary.BinaryBasicNameMapper;
+import org.apache.ignite.binary.BinaryTypeConfiguration;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.log4j.xml.DOMConfigurator;
 import org.jetbrains.annotations.Nullable;
@@ -79,7 +80,7 @@ public final class GridTestProperties {
     /** Binary marshaller compact footers property. */
     public static final String BINARY_COMPACT_FOOTERS = "binary.marshaller.compact.footers";
 
-    /** Enables {@link BinaryBasicNameMapper} with usage of simple (w/o package) name of
class. */
+    /** "True value" enables {@link BinaryBasicNameMapper} in {@link BinaryTypeConfiguration#getNameMapper()}
 */
     public static final String BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER = "binary.marshaller.use.simple.name.mapper";
 
     /** */

http://git-wip-us.apache.org/repos/asf/ignite/blob/af026d1e/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index ee69f24..46b1eb5 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -20,8 +20,6 @@ package org.apache.ignite.testsuites;
 import java.util.Set;
 import junit.framework.TestSuite;
 import org.apache.ignite.GridSuppressedExceptionSelfTest;
-import org.apache.ignite.internal.processors.database.MemoryMetricsSelfTest;
-import org.apache.ignite.util.AttributeNodeFilterSelfTest;
 import org.apache.ignite.internal.ClusterGroupHostsSelfTest;
 import org.apache.ignite.internal.ClusterGroupSelfTest;
 import org.apache.ignite.internal.GridFailFastNodeFailureDetectionSelfTest;
@@ -41,6 +39,8 @@ import org.apache.ignite.internal.processors.affinity.GridAffinityProcessorRende
 import org.apache.ignite.internal.processors.cache.GridLocalIgniteSerializationTest;
 import org.apache.ignite.internal.processors.cache.GridProjectionForCachesOnDaemonNodeSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteDaemonNodeMarshallerCacheTest;
+import org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheClassNameConflictTest;
+import org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheClientRequestsMappingOnMissTest;
 import org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheConcurrentReadWriteTest;
 import org.apache.ignite.internal.processors.closure.GridClosureProcessorSelfTest;
 import org.apache.ignite.internal.processors.closure.GridClosureSerializationTest;
@@ -50,6 +50,7 @@ import org.apache.ignite.internal.processors.database.BPlusTreeFakeReuseSelfTest
 import org.apache.ignite.internal.processors.database.BPlusTreeReuseSelfTest;
 import org.apache.ignite.internal.processors.database.BPlusTreeSelfTest;
 import org.apache.ignite.internal.processors.database.FreeListImplSelfTest;
+import org.apache.ignite.internal.processors.database.MemoryMetricsSelfTest;
 import org.apache.ignite.internal.processors.database.MetadataStorageSelfTest;
 import org.apache.ignite.internal.processors.odbc.OdbcEscapeSequenceSelfTest;
 import org.apache.ignite.internal.processors.odbc.SqlListenerProcessorValidationSelfTest;
@@ -70,6 +71,8 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.test.ConfigVariationsTestSuiteBuilderTest;
 import org.apache.ignite.testframework.test.ParametersTest;
 import org.apache.ignite.testframework.test.VariationsIteratorTest;
+import org.apache.ignite.util.AttributeNodeFilterSelfTest;
+import org.jetbrains.annotations.Nullable;
 
 /**
  * Basic test suite.
@@ -84,11 +87,11 @@ public class IgniteBasicTestSuite extends TestSuite {
     }
 
     /**
-     * @param ignoredTests Tests don't include in the execution.
+     * @param ignoredTests Tests don't include in the execution. Providing null means nothing
to exclude.
      * @return Test suite.
      * @throws Exception Thrown in case of the failure.
      */
-    public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
+    public static TestSuite suite(@Nullable final Set<Class> ignoredTests) throws Exception
{
         TestSuite suite = new TestSuite("Ignite Basic Test Suite");
 
         suite.addTest(IgniteMarshallerSelfTestSuite.suite(ignoredTests));
@@ -168,6 +171,8 @@ public class IgniteBasicTestSuite extends TestSuite {
         suite.addTestSuite(FreeListImplSelfTest.class);
         suite.addTestSuite(MemoryMetricsSelfTest.class);
 
+        suite.addTestSuite(IgniteMarshallerCacheClassNameConflictTest.class);
+        suite.addTestSuite(IgniteMarshallerCacheClientRequestsMappingOnMissTest.class);
         return suite;
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/af026d1e/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryBasicTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryBasicTestSuite.java
index 837523d..68c463e 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryBasicTestSuite.java
@@ -17,88 +17,19 @@
 
 package org.apache.ignite.testsuites;
 
-import java.util.HashSet;
-import java.util.Set;
 import junit.framework.TestSuite;
-import org.apache.ignite.internal.ClusterGroupSelfTest;
-import org.apache.ignite.internal.GridReleaseTypeSelfTest;
-import org.apache.ignite.internal.GridVersionSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.internal.managers.deployment.GridDeploymentMessageCountSelfTest;
-import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerEnumSelfTest;
-import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerNodeFailoverTest;
-import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerPooledSelfTest;
-import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerSelfTest;
-import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerSerialPersistentFieldsSelfTest;
-import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerTest;
-import org.apache.ignite.internal.marshaller.optimized.OptimizedObjectStreamSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingErrorTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingNearErrorTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingRebalanceErrorTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingTxErrorTest;
-import org.apache.ignite.internal.processors.cache.IgniteDaemonNodeMarshallerCacheTest;
-import org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheClassNameConflictTest;
-import org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheClientRequestsMappingOnMissTest;
-import org.apache.ignite.internal.util.GridHandleTableSelfTest;
-import org.apache.ignite.internal.util.IgniteUtilsSelfTest;
-import org.apache.ignite.internal.util.io.GridUnsafeDataOutputArraySizingSelfTest;
-import org.apache.ignite.internal.util.nio.GridNioSelfTest;
-import org.apache.ignite.internal.util.nio.GridNioSslSelfTest;
-import org.apache.ignite.marshaller.DynamicProxySerializationMultiJvmSelfTest;
-import org.apache.ignite.marshaller.jdk.GridJdkMarshallerSelfTest;
-import org.apache.ignite.messaging.GridMessagingNoPeerClassLoadingSelfTest;
-import org.apache.ignite.messaging.GridMessagingSelfTest;
-import org.apache.ignite.testframework.config.GridTestProperties;
 
 /**
  * Basic test suite.
+ * May be removed soon as all tests were moved to {@link IgniteBasicTestSuite}
  */
+@Deprecated
 public class IgniteBinaryBasicTestSuite extends TestSuite {
     /**
      * @return Test suite.
      * @throws Exception Thrown in case of the failure.
      */
     public static TestSuite suite() throws Exception {
-        GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
-
-        TestSuite suite = new TestSuite("GridGain Binary Basic Test Suite");
-
-        Set<Class> ignoredTests = new HashSet<>();
-
-        // Tests that are not ready to be used with PortableMarshaller
-        ignoredTests.add(GridJdkMarshallerSelfTest.class);
-        ignoredTests.add(OptimizedMarshallerEnumSelfTest.class);
-        ignoredTests.add(OptimizedMarshallerSelfTest.class);
-        ignoredTests.add(OptimizedMarshallerTest.class);
-        ignoredTests.add(OptimizedObjectStreamSelfTest.class);
-        ignoredTests.add(GridUnsafeDataOutputArraySizingSelfTest.class);
-        ignoredTests.add(OptimizedMarshallerNodeFailoverTest.class);
-        ignoredTests.add(OptimizedMarshallerSerialPersistentFieldsSelfTest.class);
-        ignoredTests.add(GridNioSslSelfTest.class);
-        ignoredTests.add(GridNioSelfTest.class);
-        ignoredTests.add(IgniteCacheP2pUnmarshallingErrorTest.class);
-        ignoredTests.add(IgniteCacheP2pUnmarshallingTxErrorTest.class);
-        ignoredTests.add(IgniteCacheP2pUnmarshallingNearErrorTest.class);
-        ignoredTests.add(IgniteCacheP2pUnmarshallingRebalanceErrorTest.class);
-        ignoredTests.add(GridReleaseTypeSelfTest.class);
-        ignoredTests.add(IgniteUtilsSelfTest.class);
-        ignoredTests.add(ClusterGroupSelfTest.class);
-        ignoredTests.add(GridMessagingNoPeerClassLoadingSelfTest.class);
-        ignoredTests.add(GridMessagingSelfTest.class);
-        ignoredTests.add(GridVersionSelfTest.class);
-        ignoredTests.add(GridDeploymentMessageCountSelfTest.class);
-        ignoredTests.add(DynamicProxySerializationMultiJvmSelfTest.class);
-        ignoredTests.add(GridHandleTableSelfTest.class);
-        ignoredTests.add(OptimizedMarshallerPooledSelfTest.class);
-
-        // TODO: check and delete if pass.
-        ignoredTests.add(IgniteDaemonNodeMarshallerCacheTest.class);
-
-        suite.addTest(IgniteBasicTestSuite.suite(ignoredTests));
-
-        suite.addTestSuite(IgniteMarshallerCacheClassNameConflictTest.class);
-        suite.addTestSuite(IgniteMarshallerCacheClientRequestsMappingOnMissTest.class);
-
-        return suite;
+        return new TestSuite("GridGain Binary Basic Test Suite: migrated to Ignite Basic
Test Suite");
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/af026d1e/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java
index 77020bd..318f87e 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinarySimpleNameMapperBasicTestSuite.java
@@ -19,6 +19,7 @@ package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheClassNameConflictTest;
 import org.apache.ignite.testframework.config.GridTestProperties;
 
 /**
@@ -33,6 +34,6 @@ public class IgniteBinarySimpleNameMapperBasicTestSuite extends TestSuite
{
         GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
         GridTestProperties.setProperty(GridTestProperties.BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER,
"true");
 
-        return IgniteBinaryBasicTestSuite.suite();
+        return IgniteBasicTestSuite.suite();
     }
 }


Mime
View raw message