ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/3] ignite git commit: ignite-comm-opts2
Date Fri, 16 Sep 2016 13:12:14 GMT
ignite-comm-opts2


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

Branch: refs/heads/ignite-comm-opts2
Commit: 91d73cbf2e8a02a6a0503a90a919b42fd5d091a0
Parents: 8749cfa
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Sep 16 12:50:28 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Sep 16 12:50:28 2016 +0300

----------------------------------------------------------------------
 .../communication/tcp/TcpCommunicationSpi.java  |  16 ++-
 .../ignite/testsuites/IgniteCacheTestSuite.java | 144 +------------------
 2 files changed, 14 insertions(+), 146 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/91d73cbf/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index d2c45f9..9031247 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -443,11 +443,16 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                 if (useTwoConnections(rmtNode)) {
                     final GridNioRecoveryDescriptor recoveryDesc = inRecoveryDescriptor(rmtNode);
 
-                    boolean reserve = recoveryDesc.tryReserve(msg0.connectCount(),
-                        new ConnectClosureNew(ses, recoveryDesc, rmtNode));
+                    ConnectClosureNew c = new ConnectClosureNew(ses, recoveryDesc, rmtNode);
+
+                    boolean reserve = recoveryDesc.tryReserve(msg0.connectCount(), c);
 
                     if (reserve)
                         connectedNew(recoveryDesc, ses, true);
+                    else {
+                        if (c.failed)
+                            ses.close();
+                    }
                 }
                 else {
                     GridCommunicationClient oldClient = clients.get(sndId);
@@ -628,7 +633,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
              * @param recovery Recovery descriptor.
              * @param ses Session.
              * @param node Node.
-             * @param rcvCnt Number of received messages..
+             * @param rcvCnt Number of received messages.
              * @param sndRes If {@code true} sends response for recovery handshake.
              * @param createClient If {@code true} creates NIO communication client.
              * @return Client.
@@ -698,6 +703,9 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                 /** */
                 private final ClusterNode rmtNode;
 
+                /** */
+                private boolean failed;
+
                 /**
                  * @param ses Incoming session.
                  * @param recoveryDesc Recovery descriptor.
@@ -713,6 +721,8 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
 
                 /** {@inheritDoc} */
                 @Override public void apply(Boolean success) {
+                    failed = !success;
+
                     if (success) {
                         IgniteInClosure<IgniteInternalFuture<?>> lsnr = new IgniteInClosure<IgniteInternalFuture<?>>()
{
                             @Override public void apply(IgniteInternalFuture<?> msgFut)
{

http://git-wip-us.apache.org/repos/asf/ignite/blob/91d73cbf/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
index 9240ef5..3efa932 100755
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
@@ -167,153 +167,11 @@ public class IgniteCacheTestSuite extends TestSuite {
     public static TestSuite suite(Set<Class> ignoredTests) throws Exception {
         TestSuite suite = new TestSuite("IgniteCache Test Suite");
 
-        suite.addTestSuite(IgniteCacheEntryListenerAtomicTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerAtomicReplicatedTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerAtomicLocalTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerTxTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerTxOffheapTieredTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerTxOffheapValuesTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerTxReplicatedTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerTxLocalTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerEagerTtlDisabledTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerAtomicOffheapTieredTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerAtomicOffheapValuesTest.class);
-
-        suite.addTestSuite(IgniteClientAffinityAssignmentSelfTest.class);
-
-        suite.addTestSuite(IgniteCacheAtomicInvokeTest.class);
-        suite.addTestSuite(IgniteCacheAtomicNearEnabledInvokeTest.class);
-        suite.addTestSuite(IgniteCacheAtomicPrimaryWriteOrderInvokeTest.class);
-        suite.addTestSuite(IgniteCacheAtomicPrimaryWriteOrderWithStoreInvokeTest.class);
-        suite.addTestSuite(IgniteCacheAtomicLocalInvokeTest.class);
-        suite.addTestSuite(IgniteCacheAtomicLocalWithStoreInvokeTest.class);
-        suite.addTestSuite(IgniteCacheTxInvokeTest.class);
-        suite.addTestSuite(CacheEntryProcessorNonSerializableTest.class);
-        suite.addTestSuite(IgniteCacheEntryProcessorCallTest.class);
-        GridTestUtils.addTestIfNeeded(suite, CacheEntryProcessorCopySelfTest.class, ignoredTests);
-        suite.addTestSuite(IgniteCacheTxNearEnabledInvokeTest.class);
-        suite.addTestSuite(IgniteCacheTxLocalInvokeTest.class);
-        suite.addTestSuite(IgniteCrossCacheTxStoreSelfTest.class);
-
-        suite.addTestSuite(IgnitePutAllLargeBatchSelfTest.class);
-        suite.addTestSuite(IgnitePutAllUpdateNonPreloadedPartitionSelfTest.class);
-
-        // User's class loader tests.
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicExecutionContextTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCachePartitionedExecutionContextTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheReplicatedExecutionContextTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxExecutionContextTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheContinuousExecutionContextTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheIsolatedExecutionContextTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheP2PDisableExecutionContextTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCachePrivateExecutionContextTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, IgniteCacheSharedExecutionContextTest.class,
ignoredTests);
-
-        // Warmup closure tests.
-        suite.addTestSuite(IgniteWarmupClosureSelfTest.class);
-
-        // Affinity tests.
-        suite.addTestSuite(FairAffinityFunctionNodesSelfTest.class);
-        suite.addTestSuite(FairAffinityFunctionSelfTest.class);
-        suite.addTestSuite(FairAffinityDynamicCacheSelfTest.class);
-        suite.addTestSuite(GridCacheAffinityBackupsSelfTest.class);
-        suite.addTestSuite(IgniteCacheAffinitySelfTest.class);
-        suite.addTestSuite(AffinityClientNodeSelfTest.class);
-        suite.addTestSuite(LocalAffinityFunctionTest.class);
-        suite.addTestSuite(AffinityHistoryCleanupTest.class);
-
-        // Swap tests.
-        suite.addTestSuite(GridCacheSwapPreloadSelfTest.class);
-        suite.addTestSuite(GridCacheSwapReloadSelfTest.class);
-
-        // Common tests.
-        suite.addTestSuite(CacheNamesSelfTest.class);
-        suite.addTestSuite(CacheNamesWithSpecialCharactersTest.class);
-        suite.addTestSuite(GridCacheConcurrentMapSelfTest.class);
-        suite.addTestSuite(GridCacheAffinityMapperSelfTest.class);
-        suite.addTestSuite(CacheAffinityCallSelfTest.class);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheAffinityRoutingSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheMvccSelfTest.class, ignoredTests);
-        suite.addTestSuite(GridCacheMvccPartitionedSelfTest.class);
-        suite.addTestSuite(GridCacheMvccManagerSelfTest.class);
-        suite.addTestSuite(GridCacheP2PUndeploySelfTest.class);
-        suite.addTestSuite(GridCacheConfigurationValidationSelfTest.class);
-        suite.addTestSuite(GridCacheConfigurationConsistencySelfTest.class);
-        suite.addTestSuite(GridCacheJdbcBlobStoreSelfTest.class);
-        suite.addTestSuite(GridCacheJdbcBlobStoreMultithreadedSelfTest.class);
-        suite.addTestSuite(CacheJdbcPojoStoreTest.class);
-        suite.addTestSuite(CacheJdbcPojoStoreOptimizedMarshallerSelfTest.class);
-        suite.addTestSuite(CacheJdbcPojoStoreBinaryMarshallerSelfTest.class);
-        suite.addTestSuite(CacheJdbcPojoStoreMultitreadedSelfTest.class);
-        suite.addTestSuite(GridCacheBalancingStoreSelfTest.class);
-        suite.addTestSuite(GridCacheAffinityApiSelfTest.class);
-        suite.addTestSuite(GridCacheStoreValueBytesSelfTest.class);
-        GridTestUtils.addTestIfNeeded(suite, DataStreamProcessorSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, DataStreamerUpdateAfterLoadTest.class, ignoredTests);
-            suite.addTestSuite(DataStreamerMultiThreadedSelfTest.class);
-        suite.addTestSuite(DataStreamerMultinodeCreateCacheTest.class);
-        suite.addTestSuite(DataStreamerImplSelfTest.class);
-        suite.addTestSuite(DataStreamerTimeoutTest.class);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheEntryMemorySizeSelfTest.class, ignoredTests);
-        suite.addTestSuite(GridCacheClearAllSelfTest.class);
-        suite.addTestSuite(GridCacheObjectToStringSelfTest.class);
-        suite.addTestSuite(GridCacheLoadOnlyStoreAdapterSelfTest.class);
-        suite.addTestSuite(GridCacheGetStoreErrorSelfTest.class);
-        suite.addTestSuite(StoreResourceInjectionSelfTest.class);
-        suite.addTestSuite(CacheFutureExceptionSelfTest.class);
-        suite.addTestSuite(GridCacheAsyncOperationsLimitSelfTest.class);
-        suite.addTestSuite(IgniteCacheManyAsyncOperationsTest.class);
-        suite.addTestSuite(GridCacheTtlManagerSelfTest.class);
-        suite.addTestSuite(GridCacheLifecycleAwareSelfTest.class);
-        suite.addTestSuite(IgniteCacheAtomicStopBusySelfTest.class);
-        suite.addTestSuite(IgniteCacheTransactionalStopBusySelfTest.class);
-        suite.addTestSuite(GridCacheAtomicNearCacheSelfTest.class);
-        suite.addTestSuite(CacheAtomicNearUpdateTopologyChangeTest.class);
-        suite.addTestSuite(CacheTxNearUpdateTopologyChangeTest.class);
-        suite.addTestSuite(GridCacheStorePutxSelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapMultiThreadedUpdateSelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapAtomicMultiThreadedUpdateSelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapValuesEvictionSelfTest.class);
-        suite.addTestSuite(GridCacheColocatedTxStoreExceptionSelfTest.class);
-        suite.addTestSuite(GridCacheReplicatedTxStoreExceptionSelfTest.class);
-        suite.addTestSuite(GridCacheLocalTxStoreExceptionSelfTest.class);
-        suite.addTestSuite(GridCacheNearTxStoreExceptionSelfTest.class);
-        suite.addTestSuite(GridCacheMissingCommitVersionSelfTest.class);
-        suite.addTestSuite(GridCacheEntrySetIterationPreloadingSelfTest.class);
-        suite.addTestSuite(GridCacheMixedPartitionExchangeSelfTest.class);
+        suite.addTestSuite(IgniteCacheMessageWriteTimeoutTest.class);
         suite.addTestSuite(IgniteCacheAtomicMessageRecoveryTest.class);
         suite.addTestSuite(IgniteCacheTxMessageRecoveryTest.class);
-        suite.addTestSuite(IgniteCacheMessageWriteTimeoutTest.class);
         suite.addTestSuite(IgniteCacheMessageRecoveryIdleConnectionTest.class);
         suite.addTestSuite(IgniteCacheConnectionRecoveryTest.class);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredEvictionAtomicSelfTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredEvictionSelfTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredAtomicSelfTest.class,
ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredSelfTest.class, ignoredTests);
-        suite.addTestSuite(GridCacheGlobalLoadTest.class);
-        suite.addTestSuite(GridCachePartitionedLocalStoreSelfTest.class);
-        suite.addTestSuite(GridCacheReplicatedLocalStoreSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedOffHeapLocalStoreSelfTest.class);
-        suite.addTestSuite(GridCacheTxPartitionedLocalStoreSelfTest.class);
-        suite.addTestSuite(IgniteCacheSystemTransactionsSelfTest.class);
-        suite.addTestSuite(CacheDeferredDeleteSanitySelfTest.class);
-
-        suite.addTest(IgniteCacheTcpClientDiscoveryTestSuite.suite());
-
-        // Heuristic exception handling.
-        suite.addTestSuite(GridCacheColocatedTxExceptionSelfTest.class);
-        suite.addTestSuite(GridCacheReplicatedTxExceptionSelfTest.class);
-        suite.addTestSuite(GridCacheLocalTxExceptionSelfTest.class);
-        suite.addTestSuite(GridCacheNearTxExceptionSelfTest.class);
-        suite.addTestSuite(GridCacheStopSelfTest.class);
-
-        suite.addTestSuite(IgniteCacheNearLockValueSelfTest.class);
-
-        suite.addTestSuite(CachePutEventListenerErrorSelfTest.class);
-
-        suite.addTestSuite(IgniteTxConfigCacheSelfTest.class);
-
-        suite.addTestSuite(CacheTxFastFinishTest.class);
 
         return suite;
     }


Mime
View raw message