From afb08017b58237b279115a8584896d741f6299d5 Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Mon, 16 Dec 2024 21:11:37 +0300 Subject: [PATCH 01/10] IGNITE-15083 Remove explicit call of setMarshaller(null) or setMarshaller(new BinaryMarshaller()) --- ...naryMarshallerInsertStatementSelfTest.java | 7 ---- ...inaryMarshallerMergeStatementSelfTest.java | 7 ---- .../internal/jdbc2/JdbcSpringSelfTest.java | 10 ------ .../JdbcThinAbstractDmlStatementSelfTest.java | 3 -- ...dbcThinAuthenticateConnectionSelfTest.java | 3 -- ...cThinConnectionAdditionalSecurityTest.java | 3 -- ...bcThinConnectionMultipleAddressesTest.java | 3 -- .../jdbc/thin/JdbcThinConnectionSSLTest.java | 3 -- .../jdbc/thin/JdbcThinConnectionSelfTest.java | 3 -- .../jdbc/thin/JdbcThinDataSourceSelfTest.java | 4 +-- .../CacheJdbcPojoStoreAbstractSelfTest.java | 11 +------ ...JdbcPojoStoreBinaryMarshallerSelfTest.java | 7 ---- ...putationBinarylizableClosuresSelfTest.java | 10 ------ .../BinaryArrayIdentityResolverSelfTest.java | 2 -- ...inaryConfigurationConsistencySelfTest.java | 2 -- ...ConfigurationCustomSerializerSelfTest.java | 2 -- .../internal/binary/BinaryEnumsSelfTest.java | 2 -- ...BinaryObjectBuilderAdditionalSelfTest.java | 2 -- ...ryObjectBuilderDefaultMappersSelfTest.java | 2 -- .../binary/BinaryObjectExceptionSelfTest.java | 2 -- .../binary/BinaryObjectToStringSelfTest.java | 10 ------ ...inarySerialiedFieldComparatorSelfTest.java | 10 ------ .../binary/GridBinaryAffinityKeySelfTest.java | 2 -- ...ltBinaryMappersBinaryMetaDataSelfTest.java | 2 -- .../managers/GridManagerStopSelfTest.java | 2 -- ...ridDiscoveryManagerAttributesSelfTest.java | 11 ------- .../cache/CacheGetEntryAbstractTest.java | 11 +------ .../cache/CacheKeepBinaryTransactionTest.java | 3 -- .../GridLocalIgniteSerializationTest.java | 12 ------- ...niteCacheBinaryEntryProcessorSelfTest.java | 10 ------ .../IgniteCacheBinaryObjectsScanSelfTest.java | 1 - ...niteCacheGetCustomCollectionsSelfTest.java | 2 -- .../cache/IgniteCacheObjectPutSelfTest.java | 2 -- .../binary/BinaryMetadataUpdatesFlowTest.java | 3 -- .../BinaryTxCacheLocalEntriesSelfTest.java | 11 ------- .../CacheKeepBinaryWithInterceptorTest.java | 10 ------ ...ryObjectMetadataExchangeMultinodeTest.java | 3 -- ...heBinaryObjectUserClassloaderSelfTest.java | 3 -- ...ryObjectsAbstractDataStreamerSelfTest.java | 2 -- ...yObjectsAbstractMultiThreadedSelfTest.java | 2 -- ...ridCacheBinaryObjectsAbstractSelfTest.java | 3 +- .../GridCacheBinaryStoreAbstractSelfTest.java | 3 -- ...NodeBinaryObjectMetadataMultinodeTest.java | 3 -- ...cheClientNodeBinaryObjectMetadataTest.java | 5 --- .../DataStreamProcessorBinarySelfTest.java | 5 --- .../GridDataStreamerImplSelfTest.java | 18 ---------- ...ridCacheAffinityRoutingBinarySelfTest.java | 3 -- ...earPartitionedByteArrayValuesSelfTest.java | 11 ------- ...artitionedOnlyByteArrayValuesSelfTest.java | 11 ------- .../distributed/CacheAffinityEarlyTest.java | 11 ------- .../CacheClientsConcurrentStartTest.java | 2 -- .../CacheGetFutureHangsSelfTest.java | 3 -- ...etadataUpdateChangingTopologySelfTest.java | 2 -- ...teBinaryMetadataUpdateNodeRestartTest.java | 2 -- ...IgniteCacheCreatePutMultiNodeSelfTest.java | 11 ------- .../distributed/IgniteCacheCreatePutTest.java | 3 -- .../GridReplicatedTxPreloadTest.java | 6 ---- .../IgnitePdsMultiNodePutGetRestartTest.java | 2 -- .../db/IgnitePdsPageEvictionTest.java | 2 -- .../file/IgnitePdsCacheIntegrationTest.java | 2 -- .../file/IgnitePdsNoActualWalHistoryTest.java | 2 -- .../db/wal/IgniteWalRecoveryPPCTest.java | 2 -- .../IgniteWalRecoverySeveralRestartsTest.java | 2 -- .../wal/WalRecoveryTxLogicalRecordsTest.java | 2 -- .../GridCacheQueryTransformerSelfTest.java | 10 ------ .../closure/GridClosureSerializationTest.java | 10 ------ .../PublicThreadpoolStarvationTest.java | 3 -- .../database/IgniteDbAbstractTest.java | 2 -- .../OdbcConfigurationValidationSelfTest.java | 2 -- .../ClosureServiceClientsNodesTest.java | 3 -- ...iteServiceProxyTimeoutInitializedTest.java | 2 -- .../ServicePredicateAccessCacheTest.java | 3 -- ...micProxySerializationMultiJvmSelfTest.java | 33 ------------------- .../IgniteMessagingWithClientTest.java | 11 ------- .../BinarySerializationQuerySelfTest.java | 3 -- .../CacheBinaryKeyConcurrentQueryTest.java | 10 ------ .../cache/CacheQueryBuildValueTest.java | 2 -- ...lientReconnectAfterClusterRestartTest.java | 2 -- ...IgniteBinaryObjectFieldsQuerySelfTest.java | 2 -- .../IgniteBinaryObjectQueryArgumentsTest.java | 2 -- ...ockPartitionOnAffinityRunAbstractTest.java | 3 -- ...niteCachePrimitiveFieldsQuerySelfTest.java | 3 -- .../IgniteCacheStarvationOnRebalanceTest.java | 3 -- .../cache/QueryEntityCaseMismatchTest.java | 3 -- .../cache/index/AbstractSchemaSelfTest.java | 3 -- .../index/DynamicIndexAbstractSelfTest.java | 3 -- ...nectorConfigurationValidationSelfTest.java | 2 -- .../query/IgniteSqlKeyValueFieldsTest.java | 3 -- .../query/IgniteSqlRoutingTest.java | 3 -- .../h2/sql/AbstractH2CompareQueryTest.java | 11 ------- ...nectorConfigurationValidationSelfTest.java | 2 -- .../FetchingQueryCursorStressTest.java | 2 -- .../store/jdbc/CachePojoStoreXmlSelfTest.java | 6 ---- 93 files changed, 4 insertions(+), 459 deletions(-) diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerInsertStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerInsertStatementSelfTest.java index 878e4de490ff6..e0471de84c24f 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerInsertStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerInsertStatementSelfTest.java @@ -18,8 +18,6 @@ package org.apache.ignite.internal.jdbc2; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; /** * JDBC test of INSERT statement w/binary marshaller - no nodes know about classes. @@ -30,11 +28,6 @@ public class JdbcBinaryMarshallerInsertStatementSelfTest extends JdbcInsertState return BASE_URL_BIN; } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - return super.getConfiguration(igniteInstanceName).setMarshaller(new BinaryMarshaller()); - } - /** {@inheritDoc} */ @Override CacheConfiguration cacheConfig() { return binaryCacheConfig(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerMergeStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerMergeStatementSelfTest.java index 8b4d3c722f575..71ba49b7fbafc 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerMergeStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcBinaryMarshallerMergeStatementSelfTest.java @@ -18,8 +18,6 @@ package org.apache.ignite.internal.jdbc2; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; /** * JDBC test of MERGE statement w/binary marshaller - no nodes know about classes. @@ -30,11 +28,6 @@ public class JdbcBinaryMarshallerMergeStatementSelfTest extends JdbcMergeStateme return BASE_URL_BIN; } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - return super.getConfiguration(igniteInstanceName).setMarshaller(new BinaryMarshaller()); - } - /** {@inheritDoc} */ @Override CacheConfiguration cacheConfig() { return binaryCacheConfig(); diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcSpringSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcSpringSelfTest.java index 63e633abd7965..9e73ecf14f3be 100644 --- a/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcSpringSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/internal/jdbc2/JdbcSpringSelfTest.java @@ -23,7 +23,6 @@ import java.util.UUID; import java.util.concurrent.Callable; import javax.sql.DataSource; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteComponentType; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteKernal; @@ -47,15 +46,6 @@ public class JdbcSpringSelfTest extends JdbcConnectionSelfTest { return "modules/clients/src/test/config/jdbc-config-cache-store.xml"; } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(gridName); - - cfg.setMarshaller(null); // In this test we are using default Marshaller. - - return cfg; - } - /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { startGridsWithSpringCtx(GRID_CNT, false, configURL()); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAbstractDmlStatementSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAbstractDmlStatementSelfTest.java index a69b7a70d4a7b..459fcc67f0582 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAbstractDmlStatementSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAbstractDmlStatementSelfTest.java @@ -30,7 +30,6 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.ConnectorConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.F; import static java.nio.charset.StandardCharsets.UTF_16; @@ -106,8 +105,6 @@ private IgniteConfiguration getConfiguration0(String igniteInstanceName) throws IgniteConfiguration getBinaryConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = getConfiguration0(igniteInstanceName); - cfg.setMarshaller(new BinaryMarshaller()); - CacheConfiguration ccfg = cfg.getCacheConfiguration()[0]; ccfg.getQueryEntities().clear(); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAuthenticateConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAuthenticateConnectionSelfTest.java index 23933d9117e2a..15cbabfc655fd 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAuthenticateConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinAuthenticateConnectionSelfTest.java @@ -25,7 +25,6 @@ import org.apache.ignite.configuration.DataRegionConfiguration; import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.junit.Test; @@ -46,8 +45,6 @@ public class JdbcThinAuthenticateConnectionSelfTest extends JdbcThinAbstractSelf @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setAuthenticationEnabled(true); cfg.setDataStorageConfiguration(new DataStorageConfiguration() diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionAdditionalSecurityTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionAdditionalSecurityTest.java index 141c872a2ae1e..2b90b35487667 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionAdditionalSecurityTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionAdditionalSecurityTest.java @@ -28,7 +28,6 @@ import javax.net.ssl.SSLContext; import org.apache.ignite.configuration.ClientConnectorConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.security.impl.TestAdditionalSecurityPluginProvider; import org.apache.ignite.internal.processors.security.impl.TestSecurityData; import org.apache.ignite.internal.util.typedef.internal.U; @@ -72,8 +71,6 @@ public class JdbcThinConnectionAdditionalSecurityTest extends JdbcThinAbstractSe @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setPluginProviders(new TestAdditionalSecurityPluginProvider("srv_" + igniteInstanceName, null, ALL_PERMISSIONS, false, true, clientData())); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java index 19a75703feb5e..46cae75251c2a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionMultipleAddressesTest.java @@ -29,7 +29,6 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.ClientConnectorConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.jdbc.thin.JdbcThinConnection; import org.apache.ignite.internal.processors.odbc.ClientListenerProcessor; import org.apache.ignite.internal.util.lang.GridAbsPredicate; @@ -72,8 +71,6 @@ private static String url() { cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME)); - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setClientConnectorConfiguration( new ClientConnectorConfiguration() .setPort(jdbcPorts.get(getTestIgniteInstanceIndex(name)))); diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java index 761d4744b8f7d..3e2bb1d41b22f 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSSLTest.java @@ -30,7 +30,6 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.configuration.ClientConnectorConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.ssl.SslContextFactory; import org.apache.ignite.testframework.GridTestUtils; @@ -85,8 +84,6 @@ public class JdbcThinConnectionSSLTest extends JdbcThinAbstractSelfTest { @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setClientConnectorConfiguration( new ClientConnectorConfiguration() .setSslEnabled(true) diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java index ce06c333928e9..7de649540c75a 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinConnectionSelfTest.java @@ -110,9 +110,6 @@ public class JdbcThinConnectionSelfTest extends JdbcThinAbstractSelfTest { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME)); - - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setGridLogger(new GridStringLogger()); return cfg; diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java index e1d3854559e45..88ba966172bd1 100644 --- a/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java +++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinDataSourceSelfTest.java @@ -39,11 +39,11 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.ClientConnectorConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.jdbc.thin.JdbcThinConnection; import org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo; import org.apache.ignite.testframework.GridTestUtils; import org.junit.Test; + import static org.apache.ignite.cache.query.SqlFieldsQuery.DFLT_LAZY; /** @@ -58,8 +58,6 @@ public class JdbcThinDataSourceSelfTest extends JdbcThinAbstractSelfTest { cfg.setCacheConfiguration(cacheConfiguration(DEFAULT_CACHE_NAME)); - cfg.setMarshaller(new BinaryMarshaller()); - return cfg; } diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java index 954319b7f5352..b15757cc5bd77 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreAbstractSelfTest.java @@ -37,9 +37,7 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.ConnectorConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -153,19 +151,12 @@ protected Connection getConnection() throws SQLException { cfg.setCacheConfiguration(cacheConfiguration()); - cfg.setMarshaller(marshaller()); - ConnectorConfiguration connCfg = new ConnectorConfiguration(); cfg.setConnectorConfiguration(connCfg); return cfg; } - /** - * @return Marshaller to be used in test. - */ - protected abstract Marshaller marshaller(); - /** * @return Types to be used in test. */ @@ -486,7 +477,7 @@ public void testLoadCachePrimitiveKeysTx() throws Exception { * @throws Exception If failed. */ private void checkPutRemove() throws Exception { - boolean binaryMarshaller = marshaller() instanceof BinaryMarshaller || marshaller() == null; + boolean binaryMarshaller = true; IgniteCache c1 = grid().cache(CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java index 300abeea40c37..cdd48b6da6a50 100644 --- a/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStoreBinaryMarshallerSelfTest.java @@ -17,19 +17,12 @@ package org.apache.ignite.cache.store.jdbc; -import org.apache.ignite.internal.binary.BinaryMarshaller; -import org.apache.ignite.marshaller.Marshaller; import org.junit.Test; /** * Test for {@link CacheJdbcPojoStore} with binary marshaller. */ public class CacheJdbcPojoStoreBinaryMarshallerSelfTest extends CacheJdbcPojoStoreAbstractSelfTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - return new BinaryMarshaller(); - } - /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java index 09889aff15046..eff3c53e54a43 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java @@ -27,8 +27,6 @@ import org.apache.ignite.binary.Binarylizable; import org.apache.ignite.compute.ComputeJobMasterLeaveAware; import org.apache.ignite.compute.ComputeTaskSession; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.lang.IgniteRunnable; @@ -39,14 +37,6 @@ * Test ensuring that correct closures are serialized. */ public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbstractTest { - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java index 1a9a54fe4b293..57e47c3f9e3cd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryArrayIdentityResolverSelfTest.java @@ -63,8 +63,6 @@ public class BinaryArrayIdentityResolverSelfTest extends GridCommonAbstractTest @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(new BinaryMarshaller()); - BinaryConfiguration binCfg = new BinaryConfiguration(); BinaryTypeConfiguration binTypCfg1 = new BinaryTypeConfiguration(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java index 96058e8f81f34..c136b02d54010 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationConsistencySelfTest.java @@ -46,8 +46,6 @@ public class BinaryConfigurationConsistencySelfTest extends GridCommonAbstractTe @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setBinaryConfiguration(binaryCfg); return cfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java index e19af7c25eadc..457955c712d3f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryConfigurationCustomSerializerSelfTest.java @@ -52,8 +52,6 @@ public class BinaryConfigurationCustomSerializerSelfTest extends GridCommonAbstr cfg.setConnectorConfiguration(new ConnectorConfiguration()); - cfg.setMarshaller(new BinaryMarshaller()); - BinaryConfiguration binaryCfg = new BinaryConfiguration(); BinaryTypeConfiguration btc = new BinaryTypeConfiguration("org.MyClass"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java index 0ded707d3a79d..6d0cc136167bf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryEnumsSelfTest.java @@ -112,8 +112,6 @@ public class BinaryEnumsSelfTest extends AbstractBinaryArraysTest { cfg.setBinaryConfiguration(bCfg); } - cfg.setMarshaller(new BinaryMarshaller()); - CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setName(CACHE_NAME); ccfg.setCacheMode(CacheMode.PARTITIONED); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java index cf3f2887b20f1..74a8b6c4568dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java @@ -97,8 +97,6 @@ public class BinaryObjectBuilderAdditionalSelfTest extends AbstractBinaryArraysT bCfg.setClassNames(Arrays.asList("org.apache.ignite.internal.binary.mutabletest.*")); - cfg.setMarshaller(new BinaryMarshaller()); - return cfg; } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java index c0449e47bdc2d..476310040e850 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderDefaultMappersSelfTest.java @@ -88,8 +88,6 @@ public class BinaryObjectBuilderDefaultMappersSelfTest extends AbstractBinaryArr cfg.setBinaryConfiguration(bCfg); - cfg.setMarshaller(new BinaryMarshaller()); - this.cfg = cfg; return cfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java index cbf59a5d38952..7203c6c6d1713 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectExceptionSelfTest.java @@ -48,8 +48,6 @@ public class BinaryObjectExceptionSelfTest extends GridCommonAbstractTest { @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(gridName); - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setCacheConfiguration( new CacheConfiguration(cacheName) .setCopyOnRead(true) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java index 7b11ad910074f..bd4fbc2e8bdb7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectToStringSelfTest.java @@ -25,7 +25,6 @@ import java.util.Map; import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.binary.BinaryObject; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -35,15 +34,6 @@ * Tests for {@code BinaryObject.toString()}. */ public class BinaryObjectToStringSelfTest extends GridCommonAbstractTest { - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } - /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { startGrid(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java index 130b37581b43b..3591b47db9d4a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySerialiedFieldComparatorSelfTest.java @@ -24,7 +24,6 @@ import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; import org.apache.ignite.binary.BinaryObjectBuilder; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.GridConcurrentHashSet; import org.apache.ignite.internal.util.GridUnsafe; import org.apache.ignite.internal.util.typedef.F; @@ -66,15 +65,6 @@ public class BinarySerialiedFieldComparatorSelfTest extends GridCommonAbstractTe super.afterTest(); } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } - /** * Test byte fields. * diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java index 850e5d9f7d615..3e5304f46fa1a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryAffinityKeySelfTest.java @@ -70,8 +70,6 @@ public class GridBinaryAffinityKeySelfTest extends GridCommonAbstractTest { cfg.setCacheKeyConfiguration(keyCfg, keyCfg2); - cfg.setMarshaller(new BinaryMarshaller()); - if (!igniteInstanceName.equals(getTestIgniteInstanceName(GRID_CNT))) { CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java index 660ef7f26e0db..be2a32cbb8007 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridDefaultBinaryMappersBinaryMetaDataSelfTest.java @@ -62,8 +62,6 @@ public class GridDefaultBinaryMappersBinaryMetaDataSelfTest extends GridCommonAb cfg.setBinaryConfiguration(bCfg); - cfg.setMarshaller(new BinaryMarshaller()); - CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); cfg.setCacheConfiguration(ccfg); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java index 4c30c84c86d24..a36345642a804 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/GridManagerStopSelfTest.java @@ -19,7 +19,6 @@ import java.lang.management.ManagementFactory; import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.managers.checkpoint.GridCheckpointManager; import org.apache.ignite.internal.managers.collision.GridCollisionManager; import org.apache.ignite.internal.managers.communication.GridIoManager; @@ -135,7 +134,6 @@ public void testStopCommunicationManager() throws Exception { injectLogger(spi); ctx.config().setCommunicationSpi(spi); - ctx.config().setMarshaller(new BinaryMarshaller()); ctx.config().setMetricExporterSpi(new NoopMetricExporterSpi()); ctx.add(new GridMetricManager(ctx)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java index 258c045e4051e..2f4212f9a9fde 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManagerAttributesSelfTest.java @@ -22,7 +22,6 @@ import org.apache.ignite.configuration.DeploymentMode; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller; import org.apache.ignite.spi.discovery.TestReconnectSecurityPluginProvider; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; @@ -47,9 +46,6 @@ public class GridDiscoveryManagerAttributesSelfTest extends GridCommonAbstractTe /** */ private static boolean p2pEnabled; - /** */ - private static boolean binaryMarshallerEnabled; - /** Security enabled. */ private static boolean secEnabled; @@ -57,9 +53,6 @@ public class GridDiscoveryManagerAttributesSelfTest extends GridCommonAbstractTe @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - if (binaryMarshallerEnabled) - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setIncludeProperties(PREFER_IPV4); cfg.setDeploymentMode(mode); cfg.setPeerClassLoadingEnabled(p2pEnabled); @@ -183,8 +176,6 @@ private void doTestUseDefaultSuid(String first, String second, boolean fail) thr public void testUseStringSerVer2() throws Exception { String old = System.getProperty(IGNITE_BINARY_MARSHALLER_USE_STRING_SERIALIZATION_VER_2); - binaryMarshallerEnabled = true; - try { doTestUseStrSerVer2(Boolean.TRUE.toString(), Boolean.FALSE.toString(), true); doTestUseStrSerVer2(Boolean.FALSE.toString(), Boolean.TRUE.toString(), true); @@ -197,8 +188,6 @@ public void testUseStringSerVer2() throws Exception { System.setProperty(IGNITE_BINARY_MARSHALLER_USE_STRING_SERIALIZATION_VER_2, old); else System.clearProperty(IGNITE_BINARY_MARSHALLER_USE_STRING_SERIALIZATION_VER_2); - - binaryMarshallerEnabled = false; } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java index b31d15437c911..446844291a73e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java @@ -30,7 +30,6 @@ import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.cache.CacheEntry; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter; @@ -42,6 +41,7 @@ import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.Nullable; import org.junit.Test; + import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -84,15 +84,6 @@ public abstract class CacheGetEntryAbstractTest extends GridCacheAbstractSelfTes return 90_000; } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(null); - - return cfg; - } - /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java index 88ccc2dde49b0..4bace231457c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheKeepBinaryTransactionTest.java @@ -25,7 +25,6 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.TransactionConfiguration; import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; @@ -47,8 +46,6 @@ public class CacheKeepBinaryTransactionTest extends GridCommonAbstractTest { cfg.setTransactionConfiguration(txCfg); - cfg.setMarshaller(new BinaryMarshaller()); - CacheConfiguration ccfg = new CacheConfiguration("tx-cache"); ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java index c8495c9f1bb21..35d1ed0c3720a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridLocalIgniteSerializationTest.java @@ -32,8 +32,6 @@ import org.apache.ignite.binary.BinaryReader; import org.apache.ignite.binary.BinaryWriter; import org.apache.ignite.binary.Binarylizable; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.marshaller.AbstractNodeNameAwareMarshaller; import org.apache.ignite.testframework.GridTestUtils; @@ -47,16 +45,6 @@ public class GridLocalIgniteSerializationTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache_name"; - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(final String igniteInstanceName) throws Exception { - final IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - if (igniteInstanceName != null && igniteInstanceName.startsWith("binary")) - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } - /** * Test that calling {@link Ignition#localIgnite()} * is safe for binary marshaller. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java index c945c0c5c3e81..50a7aa4d27308 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryEntryProcessorSelfTest.java @@ -28,7 +28,6 @@ import org.apache.ignite.cache.CacheEntryProcessor; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -43,15 +42,6 @@ public class IgniteCacheBinaryEntryProcessorSelfTest extends GridCommonAbstractT /** */ private static final int NODES = 5; - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(null); - - return cfg; - } - /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java index f3d8f069a4993..eac10e2d5e6da 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheBinaryObjectsScanSelfTest.java @@ -65,7 +65,6 @@ public class IgniteCacheBinaryObjectsScanSelfTest extends AbstractTransactionalQ cfg.setIncludeEventTypes(getIncludeEventTypes()); - cfg.setMarshaller(null); cfg.setPeerClassLoadingEnabled(false); if ("client".equals(igniteInstanceName)) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java index 4f6d2120a8112..7a3f8a6de3b3f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheGetCustomCollectionsSelfTest.java @@ -39,8 +39,6 @@ public class IgniteCacheGetCustomCollectionsSelfTest extends GridCommonAbstractT @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(null); - final CacheConfiguration mapCacheCfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME); mapCacheCfg.setCacheMode(CacheMode.PARTITIONED); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java index a9bc75aa721ff..d659730ffb9bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheObjectPutSelfTest.java @@ -44,8 +44,6 @@ public class IgniteCacheObjectPutSelfTest extends GridCommonAbstractTest { cfg.setCacheConfiguration(ccfg); - cfg.setMarshaller(null); - return cfg; } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java index d8def5d9e38f7..810e80a1fc657 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryMetadataUpdatesFlowTest.java @@ -35,7 +35,6 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.lang.IgniteCallable; @@ -127,8 +126,6 @@ public class BinaryMetadataUpdatesFlowTest extends GridCommonAbstractTest { cfg.setMetricsUpdateFrequency(1000); } - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setClientMode("client".equals(gridName) || getTestIgniteInstanceIndex(gridName) >= GRID_CNT); CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java index 17add196ca3ed..e04fc6a45c2ba 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/BinaryTxCacheLocalEntriesSelfTest.java @@ -21,8 +21,6 @@ import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.cache.CachePeekMode; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.junit.Test; @@ -47,15 +45,6 @@ public class BinaryTxCacheLocalEntriesSelfTest extends GridCacheAbstractSelfTest return ccfg; } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } - /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java index 6a5ca2b1ecbd9..4a7b4ac9bd232 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/CacheKeepBinaryWithInterceptorTest.java @@ -23,7 +23,6 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheInterceptor; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; @@ -38,15 +37,6 @@ */ @SuppressWarnings("unchecked") public class CacheKeepBinaryWithInterceptorTest extends GridCommonAbstractTest { - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(null); - - return cfg; - } - /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { stopAllGrids(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java index 39b393b845f11..3e2ec85184034 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectMetadataExchangeMultinodeTest.java @@ -33,7 +33,6 @@ import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.GridTopic; import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.managers.communication.GridIoManager; import org.apache.ignite.internal.managers.communication.GridMessageListener; import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage; @@ -77,8 +76,6 @@ public class GridCacheBinaryObjectMetadataExchangeMultinodeTest extends GridComm if (applyDiscoveryHook && discoveryHook != null) ((TestTcpDiscoverySpi)cfg.getDiscoverySpi()).discoveryHook(discoveryHook); - cfg.setMarshaller(new BinaryMarshaller()); - CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setCacheMode(CacheMode.REPLICATED); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java index bc6173ecd8f68..8ceba782df886 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectUserClassloaderSelfTest.java @@ -30,7 +30,6 @@ import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -64,8 +63,6 @@ public class GridCacheBinaryObjectUserClassloaderSelfTest extends GridCommonAbst cfg.setCacheConfiguration(cacheConfiguration(igniteInstanceName)); - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setClassLoader(useWrappingLoader ? new WrappingClassLoader(getExternalClassLoader()) : getExternalClassLoader()); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java index 5171d08bf8f99..b1bbe375b6bcd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractDataStreamerSelfTest.java @@ -37,7 +37,6 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -69,7 +68,6 @@ public abstract class GridCacheBinaryObjectsAbstractDataStreamerSelfTest extends new BinaryTypeConfiguration(TestObject.class.getName()))); cfg.setBinaryConfiguration(bCfg); - cfg.setMarshaller(new BinaryMarshaller()); return cfg; } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java index 0cac6ff778c1d..28d909d6c445d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractMultiThreadedSelfTest.java @@ -39,7 +39,6 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -75,7 +74,6 @@ public abstract class GridCacheBinaryObjectsAbstractMultiThreadedSelfTest extend new BinaryTypeConfiguration(TestObject.class.getName()))); cfg.setBinaryConfiguration(bCfg); - cfg.setMarshaller(new BinaryMarshaller()); return cfg; } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java index 530e84582701d..77abc25092383 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java @@ -56,7 +56,6 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.binary.BinaryContext; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.binary.BinaryObjectImpl; import org.apache.ignite.internal.binary.BinaryObjectOffheapImpl; import org.apache.ignite.internal.processors.cache.GridCacheAdapter; @@ -76,6 +75,7 @@ import org.jetbrains.annotations.Nullable; import org.junit.Ignore; import org.junit.Test; + import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -108,7 +108,6 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA binKeysCacheCfg.setName("BinKeysCache"); cfg.setCacheConfiguration(cacheCfg, binKeysCacheCfg); - cfg.setMarshaller(new BinaryMarshaller()); List binTypes = new ArrayList<>(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java index 5ced7da8e5f72..634bcff86efd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreAbstractSelfTest.java @@ -31,7 +31,6 @@ import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import org.junit.Test; @@ -60,8 +59,6 @@ public abstract class GridCacheBinaryStoreAbstractSelfTest extends GridCommonAbs cfg.setBinaryConfiguration(bCfg); - cfg.setMarshaller(new BinaryMarshaller()); - CacheConfiguration cacheCfg = new CacheConfiguration(DEFAULT_CACHE_NAME); cacheCfg.setCacheStoreFactory(singletonFactory(STORE)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java index b19d4034c9695..e77f25c0dd6f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataMultinodeTest.java @@ -33,7 +33,6 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.GridConcurrentHashSet; import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.internal.util.typedef.internal.U; @@ -53,8 +52,6 @@ public class GridCacheClientNodeBinaryObjectMetadataMultinodeTest extends GridCo cfg.setPeerClassLoadingEnabled(false); - cfg.setMarshaller(new BinaryMarshaller()); - CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setWriteSynchronizationMode(FULL_SYNC); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java index e8f3f38f4303e..a6c148ec7ff6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheClientNodeBinaryObjectMetadataTest.java @@ -29,7 +29,6 @@ import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.junit.Test; @@ -63,8 +62,6 @@ public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstra @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - BinaryMarshaller marsh = new BinaryMarshaller(); - BinaryConfiguration bCfg = new BinaryConfiguration(); bCfg.setClassNames(Arrays.asList(TestObject1.class.getName(), TestObject2.class.getName())); @@ -84,8 +81,6 @@ public class GridCacheClientNodeBinaryObjectMetadataTest extends GridCacheAbstra if (igniteInstanceName.equals(getTestIgniteInstanceName(gridCount() - 1))) cfg.setClientMode(true); - cfg.setMarshaller(marsh); - return cfg; } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/DataStreamProcessorBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/DataStreamProcessorBinarySelfTest.java index 94cbceadd691b..e8df90defc78a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/DataStreamProcessorBinarySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/DataStreamProcessorBinarySelfTest.java @@ -23,7 +23,6 @@ import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.events.EventType; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorSelfTest; import org.apache.ignite.stream.StreamReceiver; @@ -35,10 +34,6 @@ public class DataStreamProcessorBinarySelfTest extends DataStreamProcessorSelfTe @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - BinaryMarshaller marsh = new BinaryMarshaller(); - - cfg.setMarshaller(marsh); - cfg.setIncludeEventTypes(EventType.EVTS_ALL); return cfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java index 5ffec1eea1c2b..d4746177bd9d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/datastreaming/GridDataStreamerImplSelfTest.java @@ -33,7 +33,6 @@ import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.IgniteCacheProxy; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.internal.U; @@ -50,19 +49,10 @@ public class GridDataStreamerImplSelfTest extends GridCommonAbstractTest { /** Number of keys to load via data streamer. */ private static final int KEYS_COUNT = 1000; - /** Flag indicating should be cache configured with binary or not. */ - private static boolean binaries; - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - if (binaries) { - BinaryMarshaller marsh = new BinaryMarshaller(); - - cfg.setMarshaller(marsh); - } - cfg.setCacheConfiguration(cacheConfiguration()); return cfg; @@ -93,8 +83,6 @@ private CacheConfiguration cacheConfiguration() { @Test public void testAddDataFromMap() throws Exception { try { - binaries = false; - startGrids(2); awaitPartitionMapExchange(); @@ -142,8 +130,6 @@ public void testAddDataFromMap() throws Exception { @Test public void testAddMissingBinary() throws Exception { try { - binaries = true; - startGrids(2); awaitPartitionMapExchange(); @@ -178,8 +164,6 @@ public void testAddMissingBinary() throws Exception { @Test public void testAddBinaryDataFromMap() throws Exception { try { - binaries = true; - startGrids(2); awaitPartitionMapExchange(); @@ -238,8 +222,6 @@ public void testAddBinaryDataFromMap() throws Exception { @Test public void testAddBinaryCreatedWithBuilder() throws Exception { try { - binaries = true; - startGrids(2); awaitPartitionMapExchange(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheAffinityRoutingBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheAffinityRoutingBinarySelfTest.java index 8e3b1b5418431..7c3f96dbef063 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheAffinityRoutingBinarySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheAffinityRoutingBinarySelfTest.java @@ -22,7 +22,6 @@ import org.apache.ignite.cache.CacheKeyConfiguration; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.GridCacheAffinityRoutingSelfTest; /** @@ -47,8 +46,6 @@ public class GridCacheAffinityRoutingBinarySelfTest extends GridCacheAffinityRou cfg.setBinaryConfiguration(bCfg); - cfg.setMarshaller(new BinaryMarshaller()); - return cfg; } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.java index 24a9c1f4ed05c..5d0c40fc93ef5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.java @@ -16,8 +16,6 @@ */ package org.apache.ignite.internal.processors.cache.binary.distributed.dht; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAbstractNearPartitionedByteArrayValuesSelfTest; /** @@ -29,13 +27,4 @@ public class GridCacheBinariesNearPartitionedByteArrayValuesSelfTest @Override protected boolean peerClassLoading() { return false; } - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.java index e117cddb2a133..cbc73b332e451 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.java @@ -17,8 +17,6 @@ package org.apache.ignite.internal.processors.cache.binary.distributed.dht; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest; /** @@ -30,13 +28,4 @@ public class GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest @Override protected boolean peerClassLoading() { return false; } - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java index 27ea298938753..907a651232e4b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheAffinityEarlyTest.java @@ -27,9 +27,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -52,15 +50,6 @@ public class CacheAffinityEarlyTest extends GridCommonAbstractTest { /** Futs. */ private Collection> futs = new ArrayList<>(GRID_CNT); - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } - /** {@inheritDoc} */ @Override protected long getTestTimeout() { return 6 * 60 * 1000L; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java index 498e5c1c87db9..75cab20d4acb5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheClientsConcurrentStartTest.java @@ -96,8 +96,6 @@ public class CacheClientsConcurrentStartTest extends GridCommonAbstractTest { } }; - cfg.setMarshaller(null); - cfg.setCommunicationSpi(new TestRecordingCommunicationSpi()); if (getTestIgniteInstanceIndex(gridName) < SRV_CNT) { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java index ff5ec7dc8a435..d8cc72167ebf7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheGetFutureHangsSelfTest.java @@ -30,7 +30,6 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; @@ -60,8 +59,6 @@ public class CacheGetFutureHangsSelfTest extends GridCommonAbstractTest { ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); - cfg.setMarshaller(new BinaryMarshaller()); - CacheConfiguration ccfg = defaultCacheConfiguration(); ccfg.setCacheMode(CacheMode.PARTITIONED); ccfg.setBackups(1); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java index 417a098814e71..fef6fd9d80778 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateChangingTopologySelfTest.java @@ -59,8 +59,6 @@ public class IgniteBinaryMetadataUpdateChangingTopologySelfTest extends GridComm @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(null); - CacheConfiguration ccfg = new CacheConfiguration("cache"); ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java index 89b36eed211f8..7a51df0915f5c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteBinaryMetadataUpdateNodeRestartTest.java @@ -68,8 +68,6 @@ public class IgniteBinaryMetadataUpdateNodeRestartTest extends GridCommonAbstrac ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); - cfg.setMarshaller(null); - CacheConfiguration ccfg1 = cacheConfiguration(TX_CACHE, TRANSACTIONAL); CacheConfiguration ccfg2 = cacheConfiguration(ATOMIC_CACHE, ATOMIC); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java index c5874d4460934..2302c5d860950 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutMultiNodeSelfTest.java @@ -27,9 +27,7 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -41,15 +39,6 @@ public class IgniteCacheCreatePutMultiNodeSelfTest extends GridCommonAbstractTes /** Grid count. */ private static final int GRID_CNT = 4; - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } - /** {@inheritDoc} */ @Override protected long getTestTimeout() { return 6 * 60 * 1000L; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java index cdffda360116c..49dd17281cdc7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheCreatePutTest.java @@ -26,7 +26,6 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; @@ -54,8 +53,6 @@ public class IgniteCacheCreatePutTest extends GridCommonAbstractTest { cfg.setPeerClassLoadingEnabled(false); - cfg.setMarshaller(new BinaryMarshaller()); - CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); ccfg.setName("cache*"); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java index 654d80dca19ca..9a5f5e7dc5edf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java @@ -18,7 +18,6 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated; import org.apache.ignite.cache.CacheMode; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.distributed.IgniteTxPreloadAbstractTest; import org.junit.Ignore; import org.junit.Test; @@ -34,11 +33,6 @@ public class GridReplicatedTxPreloadTest extends IgniteTxPreloadAbstractTest { return REPLICATED; } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - return super.getConfiguration(igniteInstanceName).setMarshaller(null); - } - /** {@inheritDoc} */ @Ignore("https://issues.apache.org/jira/browse/IGNITE-1755") @Test diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java index 4247160039cb6..f63d22f429c93 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsMultiNodePutGetRestartTest.java @@ -75,8 +75,6 @@ public class IgnitePdsMultiNodePutGetRestartTest extends GridCommonAbstractTest cfg.setCacheConfiguration(ccfg); - cfg.setMarshaller(null); - BinaryConfiguration bCfg = new BinaryConfiguration(); bCfg.setCompactFooter(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java index f88d58eaec2bc..b9f03e4ffbe34 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/IgnitePdsPageEvictionTest.java @@ -72,8 +72,6 @@ public class IgnitePdsPageEvictionTest extends GridCommonAbstractTest { cfg.setCacheConfiguration(ccfg); - cfg.setMarshaller(null); - return cfg; } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java index 622e2d56fd85b..1135667535549 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCacheIntegrationTest.java @@ -79,8 +79,6 @@ public class IgnitePdsCacheIntegrationTest extends GridCommonAbstractTest { cfg.setCacheConfiguration(ccfg); - cfg.setMarshaller(null); - BinaryConfiguration bCfg = new BinaryConfiguration(); bCfg.setCompactFooter(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java index 77dcba761319e..b520e7a941cdb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsNoActualWalHistoryTest.java @@ -72,8 +72,6 @@ public class IgnitePdsNoActualWalHistoryTest extends GridCommonAbstractTest { .setMaxSize(100L * 1024 * 1024) .setPersistenceEnabled(true)); - cfg.setMarshaller(null); - BinaryConfiguration binCfg = new BinaryConfiguration(); binCfg.setCompactFooter(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java index ce2e69b9d2f1f..ab7578bf9f730 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoveryPPCTest.java @@ -111,8 +111,6 @@ public class IgniteWalRecoveryPPCTest extends GridCommonAbstractTest { cfg.setDataStorageConfiguration(dbCfg); - cfg.setMarshaller(null); - BinaryConfiguration binCfg = new BinaryConfiguration(); binCfg.setCompactFooter(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java index bfb3635bb3473..f34bc99ad3d62 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/IgniteWalRecoverySeveralRestartsTest.java @@ -84,8 +84,6 @@ public class IgniteWalRecoverySeveralRestartsTest extends GridCommonAbstractTest cfg.setDataStorageConfiguration(memCfg); - cfg.setMarshaller(null); - BinaryConfiguration binCfg = new BinaryConfiguration(); binCfg.setCompactFooter(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java index c1ba599e090e2..a8a8759b9a427 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/WalRecoveryTxLogicalRecordsTest.java @@ -137,8 +137,6 @@ public class WalRecoveryTxLogicalRecordsTest extends GridCommonAbstractTest { cfg.setDataStorageConfiguration(dbCfg); - cfg.setMarshaller(null); - BinaryConfiguration binCfg = new BinaryConfiguration(); binCfg.setCompactFooter(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java index 505a99e74a03f..8dd8fac347792 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryTransformerSelfTest.java @@ -38,7 +38,6 @@ import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.cache.query.TextQuery; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.AbstractTransactionalQueryTest; import org.apache.ignite.internal.util.lang.RunnableX; @@ -56,15 +55,6 @@ * Test for scan query with transformer. */ public class GridCacheQueryTransformerSelfTest extends AbstractTransactionalQueryTest { - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(null); - - return cfg; - } - /** {@inheritDoc} */ @Override protected void init() throws Exception { stopAllGrids(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java index a809bf9e0d791..c9e99b2dbf427 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/closure/GridClosureSerializationTest.java @@ -25,7 +25,6 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.binary.BinaryObjectException; import org.apache.ignite.compute.ComputeJobContext; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.resources.JobContextResource; @@ -37,15 +36,6 @@ * Tests handling of job result serialization error. */ public class GridClosureSerializationTest extends GridCommonAbstractTest { - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(final String igniteInstanceName) throws Exception { - final IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(null); - - return cfg; - } - /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java index bb0ef7ecfe0c6..7a102b21b82c0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/compute/PublicThreadpoolStarvationTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; @@ -49,8 +48,6 @@ public class PublicThreadpoolStarvationTest extends GridCacheAbstractSelfTest { ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); - cfg.setMarshaller(new BinaryMarshaller()); - return cfg; } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java index c05631f71ddf2..e7468313d9273 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/IgniteDbAbstractTest.java @@ -136,8 +136,6 @@ public abstract class IgniteDbAbstractTest extends GridCommonAbstractTest { if (!client) cfg.setCacheConfiguration(ccfg, ccfg2, ccfg3, ccfg4, ccfg5); - cfg.setMarshaller(null); - configure(cfg); return cfg; diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java index e0f2df3129892..9ba2f6b59fa2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/odbc/OdbcConfigurationValidationSelfTest.java @@ -22,7 +22,6 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.OdbcConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; @@ -170,7 +169,6 @@ private void check(OdbcConfiguration odbcCfg, boolean success) throws Exception cfg.setLocalHost("127.0.0.1"); cfg.setOdbcConfiguration(odbcCfg); - cfg.setMarshaller(new BinaryMarshaller()); TcpDiscoverySpi spi = new TcpDiscoverySpi(); spi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java index b6ff5b18757e2..18d8193efb7ca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ClosureServiceClientsNodesTest.java @@ -27,7 +27,6 @@ import org.apache.ignite.cluster.ClusterGroup; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.lang.GridAbsPredicate; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.lang.IgniteCallable; @@ -57,8 +56,6 @@ public class ClosureServiceClientsNodesTest extends GridCommonAbstractTest { @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setCacheConfiguration(); if (igniteInstanceName.equals(getTestIgniteInstanceName(CLIENT_IDX))) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java index 9953f991c086c..eb03684af0e86 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceProxyTimeoutInitializedTest.java @@ -81,8 +81,6 @@ public class IgniteServiceProxyTimeoutInitializedTest extends GridCommonAbstract cfg.setServiceConfiguration(scfg); } - cfg.setMarshaller(null); - final BinaryConfiguration binCfg = new BinaryConfiguration(); // Despite defaults explicitly set to lower case. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java index 15883823ece2c..96b451d6c73a8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/ServicePredicateAccessCacheTest.java @@ -27,7 +27,6 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; @@ -50,8 +49,6 @@ public class ServicePredicateAccessCacheTest extends GridCommonAbstractTest { @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(new BinaryMarshaller()); - cfg.setPeerClassLoadingEnabled(false); return cfg; diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java index b3270f1c71cea..f721a14144cc2 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/DynamicProxySerializationMultiJvmSelfTest.java @@ -20,11 +20,8 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; -import java.util.concurrent.Callable; import org.apache.ignite.Ignite; import org.apache.ignite.binary.BinaryObject; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -33,23 +30,11 @@ * Multi-JVM test for dynamic proxy serialization. */ public class DynamicProxySerializationMultiJvmSelfTest extends GridCommonAbstractTest { - /** */ - private static Callable marshFactory; - /** {@inheritDoc} */ @Override protected boolean isMultiJvm() { return true; } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(marshFactory.call()); - - return cfg; - } - /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { stopAllGrids(); @@ -60,12 +45,6 @@ public class DynamicProxySerializationMultiJvmSelfTest extends GridCommonAbstrac */ @Test public void testBinaryMarshaller() throws Exception { - marshFactory = new Callable() { - @Override public Marshaller call() throws Exception { - return new BinaryMarshaller(); - } - }; - doTestMarshaller(); } @@ -74,12 +53,6 @@ public void testBinaryMarshaller() throws Exception { */ @Test public void testToBinary() throws Exception { - marshFactory = new Callable() { - @Override public Marshaller call() throws Exception { - return new BinaryMarshaller(); - } - }; - Ignite ignite = startGrid(0); MyProxy p = create(); @@ -94,12 +67,6 @@ public void testToBinary() throws Exception { */ @Test public void testBinaryField() throws Exception { - marshFactory = new Callable() { - @Override public Marshaller call() throws Exception { - return new BinaryMarshaller(); - } - }; - Ignite ignite = startGrids(2); BinaryObject bo = ignite.binary().builder("ProxyWrapper").setField("proxy", create()).build(); diff --git a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java index 14f35d650724f..e9a68085b2bc9 100644 --- a/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/messaging/IgniteMessagingWithClientTest.java @@ -25,9 +25,7 @@ import org.apache.ignite.IgniteException; import org.apache.ignite.IgniteMessaging; import org.apache.ignite.cluster.ClusterGroup; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.resources.IgniteInstanceResource; @@ -45,15 +43,6 @@ private enum TOPIC { ORDERED } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(new BinaryMarshaller()); - - return cfg; - } - /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java index 7d74dffafc85d..e175178c13ab4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/BinarySerializationQuerySelfTest.java @@ -49,7 +49,6 @@ import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; @@ -77,8 +76,6 @@ public class BinarySerializationQuerySelfTest extends GridCommonAbstractTest { discoSpi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); cfg.setDiscoverySpi(discoSpi); - cfg.setMarshaller(new BinaryMarshaller()); - if (useReflectiveSerializer()) { BinaryTypeConfiguration binTypCfg1 = new BinaryTypeConfiguration(EntityPlain.class.getName()); BinaryTypeConfiguration binTypCfg2 = new BinaryTypeConfiguration(EntitySerializable.class.getName()); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheBinaryKeyConcurrentQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheBinaryKeyConcurrentQueryTest.java index 33081caba96e7..893138d5f78a5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheBinaryKeyConcurrentQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheBinaryKeyConcurrentQueryTest.java @@ -36,7 +36,6 @@ import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.GridTestUtils; @@ -59,15 +58,6 @@ public class CacheBinaryKeyConcurrentQueryTest extends GridCommonAbstractTest { /** */ private static final int KEYS = 1000; - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(null); - - return cfg; - } - /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryBuildValueTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryBuildValueTest.java index ec64740227e36..5c0d028342f9f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryBuildValueTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryBuildValueTest.java @@ -45,8 +45,6 @@ public class CacheQueryBuildValueTest extends GridCommonAbstractTest { @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(null); - CacheConfiguration ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME); QueryEntity entity = new QueryEntity(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java index e39022c03835c..93a1c495529b3 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java @@ -35,7 +35,6 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.events.Event; import org.apache.ignite.events.EventType; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; @@ -61,7 +60,6 @@ public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTe @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(new BinaryMarshaller()); cfg.setIncludeEventTypes(EventType.EVTS_CACHE); if (getTestIgniteInstanceName(CLIENT_ID).equals(igniteInstanceName)) { diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java index e8d88f69b7ad4..590fc1d90bb8f 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectFieldsQuerySelfTest.java @@ -63,8 +63,6 @@ protected String getPersonClassName() { cfg.setPeerClassLoadingEnabled(false); - cfg.setMarshaller(null); - if (getTestIgniteInstanceName(3).equals(igniteInstanceName)) cfg.setClassLoader(extClassLoader); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java index d118ac114f31b..2d29cbdeaf556 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java @@ -82,8 +82,6 @@ public class IgniteBinaryObjectQueryArgumentsTest extends GridCommonAbstractTest cfg.setCacheConfiguration(getCacheConfigurations()); - cfg.setMarshaller(null); - return cfg; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAbstractTest.java index 265d1ed119819..6ba457ef94435 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLockPartitionOnAffinityRunAbstractTest.java @@ -36,7 +36,6 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; import org.apache.ignite.internal.util.lang.GridAbsPredicate; @@ -110,8 +109,6 @@ public class IgniteCacheLockPartitionOnAffinityRunAbstractTest extends GridCache ((TcpCommunicationSpi)cfg.getCommunicationSpi()).setSharedMemoryPort(-1); - cfg.setMarshaller(new BinaryMarshaller()); - // TODO remove key configuration when https://issues.apache.org/jira/browse/IGNITE-5795 is fixed. cfg.setCacheKeyConfiguration(new CacheKeyConfiguration(Person.Key.class.getName(), "orgId")); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java index 9e22abb452439..886afacb3ce04 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java @@ -42,9 +42,6 @@ public class IgniteCachePrimitiveFieldsQuerySelfTest extends GridCommonAbstractT cfg.setCacheConfiguration(cacheConfiguration(CACHE_NAME)); - // Force BinaryMarshaller. - cfg.setMarshaller(null); - return cfg; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java index 80f7629d1d9e8..98e5053cd90fc 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java @@ -26,7 +26,6 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.SF; @@ -60,8 +59,6 @@ public class IgniteCacheStarvationOnRebalanceTest extends GridCacheAbstractSelfT // Use small system thread pool to reproduce the issue. cfg.setSystemThreadPoolSize(IGNITE_THREAD_POOL_SIZE); - cfg.setMarshaller(new BinaryMarshaller()); - return cfg; } diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java index 8ed66d39d4994..fa58539bd4c2b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java @@ -25,7 +25,6 @@ import org.apache.ignite.cache.QueryEntity; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; @@ -63,8 +62,6 @@ public class QueryEntityCaseMismatchTest extends GridCommonAbstractTest { CacheConfiguration ccfg = new CacheConfiguration<>(DEFAULT_CACHE_NAME); - cfg.setMarshaller(new BinaryMarshaller()); - QueryEntity qryEntity = new QueryEntity("KeyType", Integer.class.getName()); LinkedHashMap fields = new LinkedHashMap<>(); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java index f1c6386b0cf83..497b7608e7f07 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/AbstractSchemaSelfTest.java @@ -47,7 +47,6 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.IgniteInterruptedCheckedException; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.odbc.ClientListenerProcessor; import org.apache.ignite.internal.processors.port.GridPortRecord; import org.apache.ignite.internal.processors.query.GridQueryProcessor; @@ -136,8 +135,6 @@ public abstract class AbstractSchemaSelfTest extends AbstractIndexingCommonTest protected IgniteConfiguration commonConfiguration(int idx) throws Exception { IgniteConfiguration cfg = super.getConfiguration(getTestIgniteInstanceName(idx)); - cfg.setMarshaller(new BinaryMarshaller()); - DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(128 * 1024 * 1024)); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractSelfTest.java index 6e7ef9b047c76..c0bc837d889cf 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicIndexAbstractSelfTest.java @@ -41,7 +41,6 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.failure.StopNodeFailureHandler; import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.lang.IgnitePredicate; @@ -124,8 +123,6 @@ protected IgniteConfiguration clientConfiguration(int idx) throws Exception { cfg.setFailureHandler(new StopNodeFailureHandler()); - cfg.setMarshaller(new BinaryMarshaller()); - DataStorageConfiguration memCfg = new DataStorageConfiguration().setDefaultDataRegionConfiguration( new DataRegionConfiguration().setMaxSize(128L * 1024 * 1024)); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java index 6b4d483515dfa..dcfd05a950eac 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/client/ClientConnectorConfigurationValidationSelfTest.java @@ -32,7 +32,6 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.OdbcConfiguration; import org.apache.ignite.configuration.SqlConnectorConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; @@ -365,7 +364,6 @@ private IgniteConfiguration baseConfiguration() throws Exception { NODE_IDX_GEN.incrementAndGet()); cfg.setLocalHost("127.0.0.1"); - cfg.setMarshaller(new BinaryMarshaller()); TcpDiscoverySpi spi = new TcpDiscoverySpi(); spi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlKeyValueFieldsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlKeyValueFieldsTest.java index 74f784825443a..8a8c7016423ce 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlKeyValueFieldsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlKeyValueFieldsTest.java @@ -33,7 +33,6 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.index.AbstractIndexingCommonTest; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.internal.processors.query.h2.dml.UpdatePlanBuilder; @@ -81,8 +80,6 @@ public class IgniteSqlKeyValueFieldsTest extends AbstractIndexingCommonTest { @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration c = super.getConfiguration(gridName); - c.setMarshaller(new BinaryMarshaller()); - List ccfgs = new ArrayList<>(); CacheConfiguration ccfg = buildCacheConfiguration(gridName); if (ccfg != null) diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java index 76c9992da3c02..1b620e47aa7c6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java @@ -43,7 +43,6 @@ import org.apache.ignite.events.CacheQueryExecutedEvent; import org.apache.ignite.events.Event; import org.apache.ignite.events.EventType; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.index.AbstractIndexingCommonTest; import org.apache.ignite.lang.IgnitePredicate; import org.junit.Test; @@ -75,8 +74,6 @@ public class IgniteSqlRoutingTest extends AbstractIndexingCommonTest { @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { IgniteConfiguration c = super.getConfiguration(gridName); - c.setMarshaller(new BinaryMarshaller()); - List ccfgs = new ArrayList<>(); CacheConfiguration ccfg = buildCacheConfiguration(gridName); diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java index 49350473fe57e..c6d8a370aec1d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/AbstractH2CompareQueryTest.java @@ -38,8 +38,6 @@ import org.apache.ignite.cache.QueryEntity; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.index.AbstractIndexingCommonTest; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable; @@ -58,15 +56,6 @@ public abstract class AbstractH2CompareQueryTest extends AbstractIndexingCommonT /** H2 db connection. */ protected static Connection conn; - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration c = super.getConfiguration(igniteInstanceName); - - c.setMarshaller(new BinaryMarshaller()); - - return c; - } - /** * Creates new cache configuration. * diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java index c347d076d7e09..60ffdb37f7cae 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java @@ -28,7 +28,6 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.SqlConnectorConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.index.AbstractIndexingCommonTest; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; @@ -179,7 +178,6 @@ private void check(SqlConnectorConfiguration sqlCfg, boolean success) throws Exc cfg.setLocalHost("127.0.0.1"); cfg.setSqlConnectorConfiguration(sqlCfg); - cfg.setMarshaller(new BinaryMarshaller()); TcpDiscoverySpi spi = new TcpDiscoverySpi(); spi.setIpFinder(new TcpDiscoveryVmIpFinder(true)); diff --git a/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/FetchingQueryCursorStressTest.java b/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/FetchingQueryCursorStressTest.java index 6fa906f86c65b..60afd964017d4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/FetchingQueryCursorStressTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/loadtests/h2indexing/FetchingQueryCursorStressTest.java @@ -34,7 +34,6 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; /** * SQL query stress test. @@ -159,7 +158,6 @@ private static IgniteConfiguration config(int idx, boolean client) { ccfg.setName(CACHE_NAME); ccfg.setIndexedTypes(Integer.class, Person.class); - cfg.setMarshaller(new BinaryMarshaller()); cfg.setCacheConfiguration(ccfg); diff --git a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CachePojoStoreXmlSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CachePojoStoreXmlSelfTest.java index 637fe60b7f237..799cbe8513e8d 100644 --- a/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CachePojoStoreXmlSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/cache/store/jdbc/CachePojoStoreXmlSelfTest.java @@ -23,7 +23,6 @@ import org.apache.ignite.internal.IgniteComponentType; import org.apache.ignite.internal.util.spring.IgniteSpringHelper; import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.marshaller.Marshaller; /** * Tests for {@link CacheJdbcPojoStore} created via XML. @@ -50,9 +49,4 @@ public class CachePojoStoreXmlSelfTest extends CacheJdbcPojoStoreAbstractSelfTes return cfg; } - - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - return null; - } } From 7807daf1aa0bbefde29ea6755a369d84aa4b1106 Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Tue, 17 Dec 2024 18:30:59 +0300 Subject: [PATCH 02/10] IGNITE-15083 WIP --- .../IgniteCacheNoClassQuerySelfTest.java | 101 ------------------ .../IgniteBinaryCacheQueryTestSuite3.java | 2 - 2 files changed, 103 deletions(-) delete mode 100644 modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java deleted file mode 100644 index 27fceccbebb69..0000000000000 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheNoClassQuerySelfTest.java +++ /dev/null @@ -1,101 +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.internal.processors.cache; - -import java.util.Arrays; -import java.util.Collections; -import java.util.LinkedHashMap; -import org.apache.ignite.cache.QueryEntity; -import org.apache.ignite.cache.QueryIndex; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Test; - -import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; -import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; - -/** - * - */ -public class IgniteCacheNoClassQuerySelfTest extends GridCommonAbstractTest { - /** {@inheritDoc} */ - @SuppressWarnings({"deprecation"}) - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration c = super.getConfiguration(igniteInstanceName); - - CacheConfiguration cc = defaultCacheConfiguration(); - - c.setMarshaller(new JdkMarshaller()); - - cc.setName("cache"); - - cc.setAtomicityMode(TRANSACTIONAL); - cc.setWriteSynchronizationMode(FULL_SYNC); - cc.setRebalanceMode(SYNC); - - QueryEntity qryEntity = new QueryEntity(); - - qryEntity.setKeyType(Integer.class.getName()); - qryEntity.setValueType("MyClass"); - - LinkedHashMap fields = new LinkedHashMap<>(); - - fields.put("strField", String.class.getName()); - fields.put("intField", Integer.class.getName()); - fields.put("doubleField", Double.class.getName()); - - qryEntity.setFields(fields); - - qryEntity.setFields(fields); - - qryEntity.setIndexes(Arrays.asList( - new QueryIndex("strField"), - new QueryIndex("intField"), - new QueryIndex("doubleField") - )); - - cc.setQueryEntities(Collections.singletonList( - qryEntity - )); - - c.setCacheConfiguration(cc); - - return c; - } - - /** - * @throws Exception If failed. - */ - @Test - public void testNoClass() throws Exception { - try { - startGrid(); - - fail(); - } - catch (Exception e) { - assertTrue(e.getMessage().contains("default marshaller")); - } - finally { - stopAllGrids(); - } - } -} diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite3.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite3.java index 78e2896767e59..d9c9f6a363c16 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite3.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite3.java @@ -61,7 +61,6 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheDistributedJoinTest; import org.apache.ignite.internal.processors.cache.IgniteCacheFieldsQueryNoDataSelfTest; import org.apache.ignite.internal.processors.cache.IgniteCacheFullTextQueryNodeJoiningSelfTest; -import org.apache.ignite.internal.processors.cache.IgniteCacheNoClassQuerySelfTest; import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingQueryErrorTest; import org.apache.ignite.internal.processors.cache.IgniteCheckClusterStateBeforeExecuteQueryTest; import org.apache.ignite.internal.processors.cache.IndexingCachePartitionLossPolicySelfTest; @@ -221,7 +220,6 @@ // Unmarshalling query test. IgniteCacheP2pUnmarshallingQueryErrorTest.class, - IgniteCacheNoClassQuerySelfTest.class, // Cancellation. IgniteCacheDistributedQueryCancelSelfTest.class, From 7c84d792f1fdfa78ad020c6a2930f0b1c533e512 Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Tue, 17 Dec 2024 18:56:17 +0300 Subject: [PATCH 03/10] IGNITE-24013 Remove setSharedMemoryPort --- .../OptimizedMarshallerIndexNameTest.java | 269 ------------------ .../IgniteBinaryCacheQueryTestSuite3.java | 2 - 2 files changed, 271 deletions(-) delete mode 100644 modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/OptimizedMarshallerIndexNameTest.java diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/OptimizedMarshallerIndexNameTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/OptimizedMarshallerIndexNameTest.java deleted file mode 100644 index 4a4394ce861be..0000000000000 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/OptimizedMarshallerIndexNameTest.java +++ /dev/null @@ -1,269 +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.internal.processors.cache.index; - -import java.io.Externalizable; -import java.io.IOException; -import java.io.ObjectInput; -import java.io.ObjectOutput; -import java.util.List; -import java.util.UUID; -import org.apache.ignite.IgniteCache; -import org.apache.ignite.cache.query.annotations.QuerySqlField; -import org.apache.ignite.cluster.ClusterState; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.DataRegionConfiguration; -import org.apache.ignite.configuration.DataStorageConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.configuration.NearCacheConfiguration; -import org.apache.ignite.configuration.WALMode; -import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller; -import org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree; -import org.apache.ignite.internal.processors.cache.query.SqlFieldsQueryEx; -import org.apache.ignite.internal.processors.query.QueryUtils; -import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.testframework.junits.IgniteTestResources; -import org.jetbrains.annotations.NotNull; -import org.junit.Test; - -import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; - -/** - * Verifies correct indexes naming for Optimized Marshaller with enabled persistence case. - * - * See IGNITE-6915 for details. - */ - -public class OptimizedMarshallerIndexNameTest extends AbstractIndexingCommonTest { - /** Test name 1 */ - private static final String TEST_NAME1 = "Name1"; - - /** Test name 2 */ - private static final String TEST_NAME2 = "Name2"; - - /** {@inheritDoc} */ - @SuppressWarnings("deprecation") - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName, IgniteTestResources rsrcs) - throws Exception { - - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName, rsrcs); - - DataStorageConfiguration memCfg = new DataStorageConfiguration() - .setDefaultDataRegionConfiguration( - new DataRegionConfiguration().setMaxSize(300L * 1024 * 1024).setPersistenceEnabled(true)) - .setStoragePath(workSubdir() + "/db") - .setWalArchivePath(workSubdir() + "/db/wal/archive") - .setWalPath(workSubdir() + "/db/wal") - .setWalMode(WALMode.LOG_ONLY); - - cfg.setDataStorageConfiguration(memCfg); - - cfg.setMarshaller(new OptimizedMarshaller()); - - return cfg; - } - - /** - * Creates cache configuration with required indexed types. - * - * @param name The name of the cache - */ - @SuppressWarnings("deprecation") - protected static CacheConfiguration cacheConfiguration(String name) { - CacheConfiguration cfg = new CacheConfiguration<>(name); - - cfg.setAtomicityMode(TRANSACTIONAL); - cfg.setNearConfiguration(new NearCacheConfiguration<>()); - cfg.setWriteSynchronizationMode(FULL_SYNC); - cfg.setEvictionPolicy(null); - - cfg.setIndexedTypes( - UUID.class, Person.class, - UUID.class, FalsePerson.class); - - return cfg; - } - - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - U.delete(U.resolveWorkDirectory(U.defaultWorkDirectory(), workSubdir(), true)); - - startGrid(getTestIgniteInstanceName()); - grid().cluster().state(ClusterState.ACTIVE); - } - - /** - * Verifies that BPlusTree are not erroneously shared between tables in the same cache - * due to IGNITE-6915 bug. - */ - @Test - public void testOptimizedMarshallerIndex() { - - // Put objects of different types into the same cache - CacheConfiguration ccfg = cacheConfiguration("PersonEn"); - - IgniteCache cache = grid().getOrCreateCache(ccfg); - - cache.put(UUID.randomUUID(), new Person(TEST_NAME1, 42)); - cache.put(UUID.randomUUID(), new FalsePerson(32, TEST_NAME2)); - - // Run query against one particular type - SqlFieldsQueryEx qry = new SqlFieldsQueryEx( - "select * from " + QueryUtils.typeName(FalsePerson.class), true); - - // If fix for IGNITE-6915 doesn't work you should see exception like the one below in the log: - // - // org.h2.jdbc.JdbcSQLException: General error: "class org.apache.ignite.IgniteCheckedException: - // Failed to invoke getter method [type=int, property=name, - // obj=org.apache.ignite.internal.processors.cache.index.OptimizedMarshallerIndexNameTest$Person@...: - // org.apache.ignite.internal.processors.cache.index.OptimizedMarshallerIndexNameTest$Person@..., - // getter=public int org.apache.ignite.internal.processors.cache.index.OptimizedMarshallerIndexNameTest$FalsePerson.getName()]" - - List> res = cache.query(qry).getAll(); - - assertEquals(1, res.size()); - } - - /** - * Returns subdirectory of the work directory to put persistence store. - * For this test it's a class name. - * - * @return The name of subdirectory (the short name of the test class). - */ - @NotNull private String workSubdir() { - return getClass().getSimpleName(); - } - - /** Entity to query. */ - public static class Person implements Externalizable { - - /** Person name. */ - @QuerySqlField(index = true, inlineSize = 0) - private String name; - - /** Person age. */ - @QuerySqlField(index = true, inlineSize = 0) - private int age; - - /** Creates a unnamed newborn person. */ - public Person() { - } - - /** - * Creates a person. - * - * @param name Name - * @param age Age - */ - public Person(String name, int age) { - this.name = name; - this.age = age; - } - - /** - * Returns name of the person. - * @return The name of the person. - */ - public String getName() { - return name; - } - - /** - * Returns age of the person. - * @return Person's age. - */ - public int getAge() { - return age; - } - - /** {@inheritDoc} */ - @Override public void writeExternal(ObjectOutput out) throws IOException { - out.writeUTF(name); - out.writeInt(age); - } - - /** {@inheritDoc} */ - @Override public void readExternal(ObjectInput in) throws IOException { - name = in.readUTF(); - age = in.readInt(); - } - } - - /** - * The class that should not be met in the Person table queried - * due to mixing of {@link BPlusTree}-s. - * - * Note that the types of name and age are swapped. - */ - public static class FalsePerson implements Externalizable { - - /** Person numeric name in future digital age */ - @QuerySqlField(index = true, inlineSize = 0) - private int name; - - /** Age is a string. Life's road could be twisted. */ - @QuerySqlField(index = true, inlineSize = 0) - private String age; - - /** Creates an anonymous baby. */ - public FalsePerson() { - } - - /** - * Creates a person of new type. - * - * @param name Numeric name. - * @param age Digital age. - */ - public FalsePerson(int name, String age) { - this.name = name; - this.age = age; - } - - /** - * Says how should you call this person. - * - * @return that digital name of the person. - */ - public int getName() { - return name; - } - - /** - * Makes you informed about person's bio. - * - * @return age as a string. - */ - public String getAge() { - return age; - } - - /** {@inheritDoc} */ - @Override public void writeExternal(ObjectOutput out) throws IOException { - out.writeInt(name); - out.writeUTF(age); - } - - /** {@inheritDoc} */ - @Override public void readExternal(ObjectInput in) throws IOException { - name = in.readInt(); - age = in.readUTF(); - } - } -} diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite3.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite3.java index d9c9f6a363c16..0b3a09df85774 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite3.java +++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite3.java @@ -94,7 +94,6 @@ import org.apache.ignite.internal.processors.cache.index.IgniteDecimalSelfTest; import org.apache.ignite.internal.processors.cache.index.IndexColumnTypeMismatchTest; import org.apache.ignite.internal.processors.cache.index.LongIndexNameTest; -import org.apache.ignite.internal.processors.cache.index.OptimizedMarshallerIndexNameTest; import org.apache.ignite.internal.processors.cache.index.PojoIndexLocalQueryTest; import org.apache.ignite.internal.processors.cache.index.SqlPartitionEvictionTest; import org.apache.ignite.internal.processors.cache.metric.SqlViewExporterSpiTest; @@ -257,7 +256,6 @@ H2ConnectionLeaksSelfTest.class, H2ConnectionSettingsTest.class, IgniteCheckClusterStateBeforeExecuteQueryTest.class, - OptimizedMarshallerIndexNameTest.class, SqlSystemViewsSelfTest.class, ScanQueryConcurrentUpdatesTest.class, ScanQueryConcurrentSqlUpdatesTest.class, From 30128acb5f9c9192c7dce1d0a04e42cfb2b2b64a Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Tue, 17 Dec 2024 20:31:03 +0300 Subject: [PATCH 04/10] IGNITE-15083 WIP --- .../BinarySimpleNameTestPropertySelfTest.java | 25 - .../communication/GridIoManagerSelfTest.java | 2 - .../GridDeploymentManagerStopSelfTest.java | 2 - .../CacheStartupInDeploymentModesTest.java | 7 - .../GridCacheEntryMemorySizeSelfTest.java | 10 - .../cache/GridCacheP2PUndeploySelfTest.java | 12 - ...ebalancingUnmarshallingFailedSelfTest.java | 39 -- ...acheEntryProcessorNonSerializableTest.java | 433 ------------------ ...loyment2ClassLoadersJdkMarshallerTest.java | 31 -- ...t2ClassLoadersOptimizedMarshallerTest.java | 31 -- ...teServiceDeployment2ClassLoadersTest.java} | 4 +- ...ploymentClassLoadingJdkMarshallerTest.java | 31 -- ...ntClassLoadingOptimizedMarshallerTest.java | 31 -- ...iteServiceDeploymentClassLoadingTest.java} | 13 +- .../MarshallerEnumDeadlockMultiJvmTest.java | 60 --- .../p2p/ClassLoadingProblemExceptionTest.java | 4 +- .../tcp/GridCacheDhtLockBackupSelfTest.java | 7 - .../testsuites/IgniteCacheTestSuite.java | 2 - .../IgniteServiceGridTestSuite.java | 16 +- 19 files changed, 7 insertions(+), 753 deletions(-) delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersJdkMarshallerTest.java delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersOptimizedMarshallerTest.java rename modules/core/src/test/java/org/apache/ignite/internal/processors/service/{IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java => IgniteServiceDeployment2ClassLoadersTest.java} (98%) delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingJdkMarshallerTest.java delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest.java rename modules/core/src/test/java/org/apache/ignite/internal/processors/service/{IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java => IgniteServiceDeploymentClassLoadingTest.java} (96%) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java index 22a5d24babf4b..a458f7b72e07a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinarySimpleNameTestPropertySelfTest.java @@ -20,8 +20,6 @@ import org.apache.ignite.IgniteBinary; import org.apache.ignite.binary.BinaryObject; import org.apache.ignite.binary.BinaryObjectBuilder; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -32,19 +30,6 @@ * Tests testing framewrok, epecially BINARY_MARSHALLER_USE_SIMPLE_NAME_MAPPER test property. */ public class BinarySimpleNameTestPropertySelfTest extends GridCommonAbstractTest { - /** - * flag for facade disabled test. As we use binary marshaller by default al - */ - private boolean enableJdkMarshaller; - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - final IgniteConfiguration configuration = super.getConfiguration(igniteInstanceName); - if (enableJdkMarshaller) - configuration.setMarshaller(new JdkMarshaller()); - return configuration; - } - /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); @@ -77,16 +62,6 @@ public void testPropertyDisabled() throws Exception { checkProperty("org.ignite.test.TestClass"); } - /** - * Check if Binary facade is disabled test. Test uses JDK marshaller to provide warranty facade is not available - * @throws Exception If failed. - */ - @Test - public void testBinaryDisabled() throws Exception { - enableJdkMarshaller = true; - assertNull(startGrid().binary()); - } - /** * @param expTypeName Type name. * @throws Exception If failed. diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java index 87d763c0b0e56..80533876e62d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/communication/GridIoManagerSelfTest.java @@ -28,7 +28,6 @@ import org.apache.ignite.internal.GridTopic; import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; import org.apache.ignite.internal.util.typedef.F; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.plugin.extensions.communication.MessageReader; import org.apache.ignite.plugin.extensions.communication.MessageWriter; @@ -72,7 +71,6 @@ public GridIoManagerSelfTest() throws IgniteCheckedException { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { ctx.config().setCommunicationSpi(new TcpCommunicationSpi()); - ctx.config().setMarshaller(new JdkMarshaller()); // Turn off peer class loading to simplify mocking. ctx.config().setPeerClassLoadingEnabled(false); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java index ec61b5cdf102b..255d8cc8bd387 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentManagerStopSelfTest.java @@ -21,7 +21,6 @@ import org.apache.ignite.internal.GridComponent; import org.apache.ignite.internal.processors.resource.GridResourceProcessor; import org.apache.ignite.lang.IgniteFuture; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.spi.IgniteSpiContext; import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.deployment.DeploymentListener; @@ -46,7 +45,6 @@ public void testOnKernalStop() throws Exception { GridTestKernalContext ctx = newContext(); - ctx.config().setMarshaller(new JdkMarshaller()); ctx.config().setDeploymentSpi(spi); GridResourceProcessor resProc = new GridResourceProcessor(ctx); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java index f1c341302faa5..c8facebd2472e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheStartupInDeploymentModesTest.java @@ -23,7 +23,6 @@ import org.apache.ignite.configuration.DeploymentMode; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.binary.BinaryMarshaller; -import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -40,14 +39,10 @@ public class CacheStartupInDeploymentModesTest extends GridCommonAbstractTest { /** */ private DeploymentMode deploymentMode; - /** */ - private Marshaller marshaller; - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(marshaller); cfg.setDeploymentMode(deploymentMode); CacheConfiguration cacheCfg1 = new CacheConfiguration(DEFAULT_CACHE_NAME); @@ -76,7 +71,6 @@ public class CacheStartupInDeploymentModesTest extends GridCommonAbstractTest { @Test public void testStartedInIsolatedMode() throws Exception { deploymentMode = DeploymentMode.ISOLATED; - marshaller = new BinaryMarshaller(); doCheckStarted(deploymentMode); } @@ -87,7 +81,6 @@ public void testStartedInIsolatedMode() throws Exception { @Test public void testStartedInPrivateMode() throws Exception { deploymentMode = DeploymentMode.PRIVATE; - marshaller = new BinaryMarshaller(); doCheckStarted(deploymentMode); } diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java index c5ab1798ee787..000b208f7a340 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryMemorySizeSelfTest.java @@ -26,7 +26,6 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheEntry; @@ -76,15 +75,6 @@ public class GridCacheEntryMemorySizeSelfTest extends GridCommonAbstractTest { /** 2KB value size in bytes. */ private static int TWO_KB_VAL_SIZE; - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setMarshaller(createMarshaller()); - - return cfg; - } - /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { try { diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java index 764f46fcc2dc4..be01329ca87c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java @@ -77,12 +77,6 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest { repCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); repCacheCfg.setAtomicityMode(TRANSACTIONAL); - // TODO GG-10884. -// if (offheap) -// repCacheCfg.setOffHeapMaxMemory(OFFHEAP); -// else -// repCacheCfg.setSwapEnabled(true); - CacheConfiguration partCacheCfg = defaultCacheConfiguration(); partCacheCfg.setName("partitioned"); @@ -92,12 +86,6 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest { partCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); partCacheCfg.setAtomicityMode(TRANSACTIONAL); - // TODO GG-10884. -// if (offheap) -// partCacheCfg.setOffHeapMaxMemory(OFFHEAP); -// else -// partCacheCfg.setSwapEnabled(true); - cfg.setCacheConfiguration(repCacheCfg, partCacheCfg); cfg.setDeploymentMode(SHARED); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java index 90a6075ff7e0b..789d0d43e2257 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java @@ -29,10 +29,6 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; -import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller; -import org.apache.ignite.marshaller.Marshaller; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.testframework.ListeningTestLogger; import org.apache.ignite.testframework.LogListener; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; @@ -49,9 +45,6 @@ public class GridCacheRebalancingUnmarshallingFailedSelfTest extends GridCommonA /** Allows to change behavior of readExternal method. */ protected static AtomicInteger readCnt = new AtomicInteger(); - /** */ - private volatile Marshaller marshaller; - /** */ private ListeningTestLogger customLog; @@ -124,7 +117,6 @@ public TestKey() { cfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL); iCfg.setCacheConfiguration(cfg); - iCfg.setMarshaller(marshaller); iCfg.setGridLogger(customLog); return iCfg; @@ -135,43 +127,12 @@ public TestKey() { */ @Test public void testBinary() throws Exception { - marshaller = new BinaryMarshaller(); - - runTest(); - } - - /** - * @throws Exception e. - */ - @Test - public void testOptimized() throws Exception { - marshaller = new OptimizedMarshaller(); - - runTest(); - } - - /** - * @throws Exception e. - */ - @Test - public void testJdk() throws Exception { - marshaller = new JdkMarshaller(); - - runTest(); - } - - /** - * @throws Exception e. - */ - private void runTest() throws Exception { customLog = new ListeningTestLogger(log); LogListener unmarshalErrorLogListener = LogListener.matches(UNMARSHALING_ERROR_PATTERN).atLeast(1).build(); customLog.registerListener(unmarshalErrorLogListener); - assert marshaller != null; - readCnt.set(Integer.MAX_VALUE); startGrid(0); diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java deleted file mode 100644 index b7f05f55ee292..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheEntryProcessorNonSerializableTest.java +++ /dev/null @@ -1,433 +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.internal.processors.cache.query.continuous; - -import java.io.NotSerializableException; -import java.util.concurrent.Callable; -import java.util.concurrent.ThreadLocalRandom; -import javax.cache.processor.EntryProcessor; -import javax.cache.processor.EntryProcessorException; -import javax.cache.processor.MutableEntry; -import org.apache.ignite.Ignite; -import org.apache.ignite.IgniteCache; -import org.apache.ignite.cache.CacheWriteSynchronizationMode; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.configuration.NearCacheConfiguration; -import org.apache.ignite.internal.IgniteEx; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; -import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.apache.ignite.transactions.Transaction; -import org.apache.ignite.transactions.TransactionConcurrency; -import org.apache.ignite.transactions.TransactionIsolation; -import org.junit.Test; - -import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; -import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC; -import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; -import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; -import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED; -import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; -import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; - -/** - * - */ -public class CacheEntryProcessorNonSerializableTest extends GridCommonAbstractTest { - /** */ - private static final int EXPECTED_VALUE = 42; - - /** */ - private static final int WRONG_VALUE = -1; - - /** */ - private static final int NODES = 3; - - /** */ - public static final int ITERATION_CNT = 1; - - /** */ - private static final int KEY = 10; - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - //set custom marshaller to get expected exception - cfg.setMarshaller(new JdkMarshaller()); - - return cfg; - } - - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - super.beforeTestsStarted(); - - startGridsMultiThreaded(getServerNodeCount()); - - startClientGrid(getServerNodeCount()); - } - - /** - * @return Server nodes. - */ - private int getServerNodeCount() { - return NODES; - } - - /** - * @throws Exception If failed. - */ - @Test - public void testPessimisticOnePhaseCommit() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1); - - doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testPessimisticOnePhaseCommitWithNearCache() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1) - .setNearConfiguration(new NearCacheConfiguration<>()); - - doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testPessimisticOnePhaseCommitFullSync() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1); - - doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testPessimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1) - .setNearConfiguration(new NearCacheConfiguration<>()); - - doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testPessimistic() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2); - - doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testPessimisticWithNearCache() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2) - .setNearConfiguration(new NearCacheConfiguration<>()); - - doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testPessimisticFullSync() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2); - - doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testPessimisticFullSyncWithNearCache() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2) - .setNearConfiguration(new NearCacheConfiguration<>()); - - doTestInvokeTest(ccfg, PESSIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, PESSIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, PESSIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testOptimisticOnePhaseCommit() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1); - - doTestInvokeTest(ccfg, OPTIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, OPTIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, OPTIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testOptimisticOnePhaseCommitWithNearCache() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 1) - .setNearConfiguration(new NearCacheConfiguration<>()); - - doTestInvokeTest(ccfg, OPTIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, OPTIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, OPTIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testOptimisticOnePhaseCommitFullSync() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1); - - doTestInvokeTest(ccfg, OPTIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, OPTIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, OPTIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testOptimisticOnePhaseCommitFullSyncWithNearCache() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 1) - .setNearConfiguration(new NearCacheConfiguration<>()); - - doTestInvokeTest(ccfg, OPTIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, OPTIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, OPTIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testOptimistic() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2); - - doTestInvokeTest(ccfg, OPTIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, OPTIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, OPTIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testOptimisticWithNearCache() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(PRIMARY_SYNC, 2) - .setNearConfiguration(new NearCacheConfiguration<>()); - - doTestInvokeTest(ccfg, OPTIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, OPTIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, OPTIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testOptimisticFullSync() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2); - - doTestInvokeTest(ccfg, OPTIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, OPTIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, OPTIMISTIC, SERIALIZABLE); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testOptimisticFullSyncWithNearCache() throws Exception { - CacheConfiguration ccfg = cacheConfiguration(FULL_SYNC, 2); - - doTestInvokeTest(ccfg, OPTIMISTIC, READ_COMMITTED); - - doTestInvokeTest(ccfg, OPTIMISTIC, REPEATABLE_READ); - - doTestInvokeTest(ccfg, OPTIMISTIC, SERIALIZABLE); - } - - /** - * @param ccfg Cache configuration. - */ - @SuppressWarnings({"unchecked", "ThrowableNotThrown"}) - private void doTestInvokeTest(CacheConfiguration ccfg, TransactionConcurrency txConcurrency, - TransactionIsolation txIsolation) { - IgniteEx cln = grid(getServerNodeCount()); - - grid(0).createCache(ccfg); - - awaitCacheOnClient(cln, ccfg.getName()); - - IgniteCache clnCache; - - if (ccfg.getNearConfiguration() != null) - clnCache = cln.createNearCache(ccfg.getName(), ccfg.getNearConfiguration()); - else - clnCache = cln.cache(ccfg.getName()); - - clnCache.put(KEY, EXPECTED_VALUE); - - try { - // Explicit tx. - for (int i = 0; i < ITERATION_CNT; i++) { - checkTxInvoke(cln, clnCache, txConcurrency, txIsolation); - - assertEquals(EXPECTED_VALUE, clnCache.get(KEY)); - } - - // From affinity node. - Ignite grid = grid(ThreadLocalRandom.current().nextInt(NODES)); - - final IgniteCache cache = grid.cache(ccfg.getName()); - - // Explicit tx. - for (int i = 0; i < ITERATION_CNT; i++) { - checkTxInvoke(grid, cache, txConcurrency, txIsolation); - - assertEquals(EXPECTED_VALUE, cache.get(KEY)); - } - - final IgniteCache clnCache0 = clnCache; - - // Implicit tx. - for (int i = 0; i < ITERATION_CNT; i++) { - GridTestUtils.assertThrowsWithCause(new Callable() { - @Override public Object call() { - clnCache0.invoke(KEY, new NonSerialazibleEntryProcessor()); - - return null; - } - }, NotSerializableException.class); - } - - assertEquals(EXPECTED_VALUE, clnCache.get(KEY)); - } - finally { - grid(0).destroyCache(ccfg.getName()); - } - } - - /** - * @param node Grid node. - * @param cache Node cache. - * @param txConcurrency Transaction concurrency. - * @param txIsolation Transaction isolation. - */ - @SuppressWarnings({"unchecked", "ThrowableNotThrown"}) - private void checkTxInvoke(Ignite node, IgniteCache cache, TransactionConcurrency txConcurrency, - TransactionIsolation txIsolation) { - try (final Transaction tx = node.transactions().txStart(txConcurrency, txIsolation)) { - cache.put(KEY, WRONG_VALUE); - - cache.invoke(KEY, new NonSerialazibleEntryProcessor()); - - GridTestUtils.assertThrowsWithCause(new Callable() { - @Override public Object call() { - tx.commit(); - - return null; - } - }, NotSerializableException.class); - } - } - - /** - * @return Cache configuration. - */ - private CacheConfiguration cacheConfiguration(CacheWriteSynchronizationMode wrMode, int backup) { - return new CacheConfiguration("test-cache-" + wrMode + "-" + backup) - .setAtomicityMode(TRANSACTIONAL) - .setWriteSynchronizationMode(FULL_SYNC) - .setBackups(backup); - } - - /** - * - */ - private static class NonSerialazibleEntryProcessor implements EntryProcessor { - /** {@inheritDoc} */ - @Override public Integer process(MutableEntry entry, Object... arguments) - throws EntryProcessorException { - entry.setValue(42); - - return null; - } - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersJdkMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersJdkMarshallerTest.java deleted file mode 100644 index 3855601fd858f..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersJdkMarshallerTest.java +++ /dev/null @@ -1,31 +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.internal.processors.service; - -import org.apache.ignite.marshaller.Marshaller; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; - -/** - * Tests that not all nodes in cluster need user's service definition (only nodes according to filter). - */ -public class IgniteServiceDeployment2ClassLoadersJdkMarshallerTest - extends IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - return new JdkMarshaller(); - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersOptimizedMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersOptimizedMarshallerTest.java deleted file mode 100644 index 1d212488c8bc9..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersOptimizedMarshallerTest.java +++ /dev/null @@ -1,31 +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.internal.processors.service; - -import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller; -import org.apache.ignite.marshaller.Marshaller; - -/** - * Tests that not all nodes in cluster need user's service definition (only nodes according to filter). - */ -public class IgniteServiceDeployment2ClassLoadersOptimizedMarshallerTest - extends IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - return new OptimizedMarshaller(false); - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersTest.java similarity index 98% rename from modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java rename to modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersTest.java index 86de5c848f28e..a64bcb68e21c3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeployment2ClassLoadersTest.java @@ -36,7 +36,7 @@ /** * Tests that not all nodes in cluster need user's service and interceptor definition (only nodes according to filter). */ -public class IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest extends GridCommonAbstractTest { +public class IgniteServiceDeployment2ClassLoadersTest extends GridCommonAbstractTest { /** */ private static final String NOOP_SERVICE_CLS_NAME = "org.apache.ignite.tests.p2p.NoopService"; @@ -89,8 +89,6 @@ public class IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest extends G cfg.setPeerClassLoadingEnabled(false); - cfg.setMarshaller(marshaller()); - cfg.setUserAttributes(Collections.singletonMap(NODE_NAME_ATTR, igniteInstanceName)); if (grp1.contains(igniteInstanceName)) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingJdkMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingJdkMarshallerTest.java deleted file mode 100644 index aeb68af00ed4d..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingJdkMarshallerTest.java +++ /dev/null @@ -1,31 +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.internal.processors.service; - -import org.apache.ignite.marshaller.Marshaller; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; - -/** - * Tests that not all nodes in cluster need user's service definition (only nodes according to filter). - */ -public class IgniteServiceDeploymentClassLoadingJdkMarshallerTest - extends IgniteServiceDeploymentClassLoadingDefaultMarshallerTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - return new JdkMarshaller(); - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest.java deleted file mode 100644 index d02151760a5bd..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest.java +++ /dev/null @@ -1,31 +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.internal.processors.service; - -import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller; -import org.apache.ignite.marshaller.Marshaller; - -/** - * Tests that not all nodes in cluster need user's service definition (only nodes according to filter). - */ -public class IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest - extends IgniteServiceDeploymentClassLoadingDefaultMarshallerTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - return new OptimizedMarshaller(false); - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingTest.java similarity index 96% rename from modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java rename to modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingTest.java index febac2431fe38..eda1c840bad84 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/service/IgniteServiceDeploymentClassLoadingTest.java @@ -26,7 +26,6 @@ import org.apache.ignite.failure.StopNodeFailureHandler; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.lang.IgnitePredicate; -import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceConfiguration; import org.apache.ignite.services.ServiceDeploymentException; @@ -38,7 +37,7 @@ /** * Tests that not all nodes in cluster need user's service definition (only nodes according to filter). */ -public class IgniteServiceDeploymentClassLoadingDefaultMarshallerTest extends GridCommonAbstractTest { +public class IgniteServiceDeploymentClassLoadingTest extends GridCommonAbstractTest { /** */ private static final String NOOP_SERVICE_CLS_NAME = "org.apache.ignite.tests.p2p.NoopService"; @@ -71,9 +70,6 @@ public class IgniteServiceDeploymentClassLoadingDefaultMarshallerTest extends Gr IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setPeerClassLoadingEnabled(false); - - cfg.setMarshaller(marshaller()); - cfg.setUserAttributes(Collections.singletonMap(NODE_NAME_ATTR, igniteInstanceName)); if (extClsLdrGrids.contains(igniteInstanceName)) @@ -84,13 +80,6 @@ public class IgniteServiceDeploymentClassLoadingDefaultMarshallerTest extends Gr return cfg; } - /** - * @return Marshaller. - */ - protected Marshaller marshaller() { - return null; - } - /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java index 7ae0f0d3b93c5..3c676123916c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/MarshallerEnumDeadlockMultiJvmTest.java @@ -21,13 +21,8 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import javax.cache.configuration.Factory; import org.apache.ignite.Ignite; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; -import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller; import org.apache.ignite.lang.IgniteCallable; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -36,40 +31,9 @@ * Contains test of Enum marshalling with various {@link Marshaller}s. See IGNITE-8547 for details. */ public class MarshallerEnumDeadlockMultiJvmTest extends GridCommonAbstractTest { - /** */ - private Factory marshFactory; - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String instanceName) throws Exception { - return super.getConfiguration(instanceName).setMarshaller(marshFactory.create()); - } - - /** */ - @Test - public void testJdkMarshaller() throws Exception { - marshFactory = new JdkMarshallerFactory(); - - runRemoteUnmarshal(); - } - - /** */ - @Test - public void testOptimizedMarshaller() throws Exception { - marshFactory = new OptimizedMarshallerFactory(); - - runRemoteUnmarshal(); - } - /** */ @Test public void testBinaryMarshaller() throws Exception { - marshFactory = new BinaryMarshallerFactory(); - - runRemoteUnmarshal(); - } - - /** */ - private void runRemoteUnmarshal() throws Exception { Ignite ignite = startGrid(0); byte[] one = ignite.configuration().getMarshaller().marshal(DeclaredBodyEnum.ONE); @@ -90,30 +54,6 @@ private void runRemoteUnmarshal() throws Exception { stopAllGrids(); } - /** */ - private static class OptimizedMarshallerFactory implements Factory { - /** {@inheritDoc} */ - @Override public Marshaller create() { - return new OptimizedMarshaller(false); - } - } - - /** */ - private static class BinaryMarshallerFactory implements Factory { - /** {@inheritDoc} */ - @Override public Marshaller create() { - return new BinaryMarshaller(); - } - } - - /** */ - private static class JdkMarshallerFactory implements Factory { - /** {@inheritDoc} */ - @Override public Marshaller create() { - return new JdkMarshaller(); - } - } - /** * Attempts to unmarshal both in-built and inner-class enum values at exactly the same time in multiple threads. */ diff --git a/modules/core/src/test/java/org/apache/ignite/p2p/ClassLoadingProblemExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/p2p/ClassLoadingProblemExceptionTest.java index 74148dffeb247..44a39859e05b7 100644 --- a/modules/core/src/test/java/org/apache/ignite/p2p/ClassLoadingProblemExceptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/p2p/ClassLoadingProblemExceptionTest.java @@ -43,7 +43,6 @@ import org.apache.ignite.internal.managers.deployment.GridDeploymentMetadata; import org.apache.ignite.internal.managers.deployment.GridDeploymentStore; import org.apache.ignite.internal.managers.deployment.GridTestDeployment; -import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshaller; import org.apache.ignite.internal.processors.cache.IgnitePeerToPeerClassLoadingException; import org.apache.ignite.internal.processors.cache.query.GridCacheQueryRequest; import org.apache.ignite.internal.util.typedef.X; @@ -97,8 +96,7 @@ public class ClassLoadingProblemExceptionTest extends GridCommonAbstractTest imp .setClientMode(igniteInstanceName.startsWith(CLIENT_PREFIX)) .setPeerClassLoadingEnabled(true) .setDeploymentMode(SHARED) - .setCommunicationSpi(new TestCommunicationSpi()) - .setMarshaller(new OptimizedMarshaller()); + .setCommunicationSpi(new TestCommunicationSpi()); return cfg; } diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java index cd1ead07edfd0..f6511a62eccd4 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridCacheDhtLockBackupSelfTest.java @@ -31,8 +31,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridNearUnlockRequest; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteRunnable; -import org.apache.ignite.marshaller.Marshaller; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.communication.CommunicationSpi; import org.apache.ignite.testframework.GridTestThread; @@ -50,9 +48,6 @@ public class GridCacheDhtLockBackupSelfTest extends GridCommonAbstractTest { /** Communication spi for grid start. */ private CommunicationSpi commSpi; - /** Marshaller used in test. */ - private Marshaller marsh = new JdkMarshaller(); - /** * */ @@ -66,8 +61,6 @@ public GridCacheDhtLockBackupSelfTest() { cfg.setCacheConfiguration(cacheConfiguration()); - cfg.setMarshaller(marsh); - assert commSpi != null; cfg.setCommunicationSpi(commSpi); 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 e5c3c6b44a978..836f0a001b6bc 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 @@ -85,7 +85,6 @@ import org.apache.ignite.internal.processors.cache.distributed.IgniteCrossCacheTxStoreSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheGetStoreErrorSelfTest; import org.apache.ignite.internal.processors.cache.query.continuous.CacheEntryProcessorExternalizableFailedTest; -import org.apache.ignite.internal.processors.cache.query.continuous.CacheEntryProcessorNonSerializableTest; import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorPersistenceSelfTest; import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorSelfTest; import org.apache.ignite.internal.processors.datastreamer.DataStreamerClientReconnectAfterClusterRestartTest; @@ -132,7 +131,6 @@ public static List> suite(Collection ignoredTests) { GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicWithStoreInvokeTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, IgniteCacheAtomicConcurrentUnorderedUpdateAllTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, IgniteCacheTxInvokeTest.class, ignoredTests); - GridTestUtils.addTestIfNeeded(suite, CacheEntryProcessorNonSerializableTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, CacheEntryProcessorExternalizableFailedTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, IgniteCacheEntryProcessorCallTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, RemoveEntryProcessorTransactionTest.class, ignoredTests); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteServiceGridTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteServiceGridTestSuite.java index 6b6a2716b8e4e..d0e099348b8f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteServiceGridTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteServiceGridTestSuite.java @@ -40,12 +40,8 @@ import org.apache.ignite.internal.processors.service.GridServiceSerializationSelfTest; import org.apache.ignite.internal.processors.service.IgniteServiceCallContextTest; import org.apache.ignite.internal.processors.service.IgniteServiceCallInterceptorTest; -import org.apache.ignite.internal.processors.service.IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest; -import org.apache.ignite.internal.processors.service.IgniteServiceDeployment2ClassLoadersJdkMarshallerTest; -import org.apache.ignite.internal.processors.service.IgniteServiceDeployment2ClassLoadersOptimizedMarshallerTest; -import org.apache.ignite.internal.processors.service.IgniteServiceDeploymentClassLoadingDefaultMarshallerTest; -import org.apache.ignite.internal.processors.service.IgniteServiceDeploymentClassLoadingJdkMarshallerTest; -import org.apache.ignite.internal.processors.service.IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest; +import org.apache.ignite.internal.processors.service.IgniteServiceDeployment2ClassLoadersTest; +import org.apache.ignite.internal.processors.service.IgniteServiceDeploymentClassLoadingTest; import org.apache.ignite.internal.processors.service.IgniteServiceDeploymentFailureTest; import org.apache.ignite.internal.processors.service.IgniteServiceDynamicCachesSelfTest; import org.apache.ignite.internal.processors.service.IgniteServiceProxyTimeoutInitializedTest; @@ -101,12 +97,8 @@ ServiceDeploymentOnActivationTest.class, ServiceDeploymentOutsideBaselineTest.class, - IgniteServiceDeploymentClassLoadingDefaultMarshallerTest.class, - IgniteServiceDeploymentClassLoadingJdkMarshallerTest.class, - IgniteServiceDeploymentClassLoadingOptimizedMarshallerTest.class, - IgniteServiceDeployment2ClassLoadersDefaultMarshallerTest.class, - IgniteServiceDeployment2ClassLoadersJdkMarshallerTest.class, - IgniteServiceDeployment2ClassLoadersOptimizedMarshallerTest.class, + IgniteServiceDeploymentClassLoadingTest.class, + IgniteServiceDeployment2ClassLoadersTest.class, IgniteServiceDeploymentFailureTest.class, GridServiceDeploymentExceptionPropagationTest.class, From 5ea792ed13feca1172dbad23ec67b49a209984ae Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Wed, 18 Dec 2024 13:26:37 +0300 Subject: [PATCH 05/10] IGNITE-15083 WIP --- .../optimized/OptimizedMarshallerNodeFailoverTest.java | 3 ++- .../testframework/junits/multijvm/IgniteNodeRunner.java | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java index 873fe8882e3d0..51cd1f9c9996f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java @@ -50,10 +50,11 @@ public class OptimizedMarshallerNodeFailoverTest extends GridCommonAbstractTest @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - cfg.setMarshaller(new OptimizedMarshaller()); + //cfg.setMarshaller(new OptimizedMarshaller()); cfg.setWorkDirectory(workDir); + if (cache) { CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteNodeRunner.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteNodeRunner.java index 7cc2a892610bf..b9fa2db1b67a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteNodeRunner.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteNodeRunner.java @@ -99,7 +99,7 @@ public static boolean hasStartedInstance() { public static String storeToFile(IgniteConfiguration cfg, boolean resetDiscovery) throws IOException, IgniteCheckedException { String fileName = IGNITE_CONFIGURATION_FILE + cfg.getNodeId(); - storeToFile(cfg, fileName, true, resetDiscovery); + storeToFile(cfg, fileName, resetDiscovery); return fileName; } @@ -109,20 +109,15 @@ public static String storeToFile(IgniteConfiguration cfg, boolean resetDiscovery * * @param cfg Ignite Configuration. * @param fileName A name of file where the configuration was stored. - * @param resetMarshaller Reset marshaller configuration to default. * @param resetDiscovery Reset discovery configuration to default. * @throws IOException If failed. * @see #readCfgFromFileAndDeleteFile(String) */ public static void storeToFile(IgniteConfiguration cfg, String fileName, - boolean resetMarshaller, boolean resetDiscovery) throws IOException, IgniteCheckedException { try (OutputStream out = new BufferedOutputStream(new FileOutputStream(fileName))) { IgniteConfiguration cfg0 = new IgniteConfiguration(cfg); - if (resetMarshaller) - cfg0.setMarshaller(null); - if (resetDiscovery) cfg0.setDiscoverySpi(null); From 301c375bc93d9fb04d5ac984b02637a656b6a7bf Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Thu, 19 Dec 2024 11:55:52 +0300 Subject: [PATCH 06/10] IGNITE-15083 WIP --- ...dCacheStoreManagerDeserializationTest.java | 10 +- ...lientDiscoveryMarshallerCheckSelfTest.java | 57 ++--------- .../TcpDiscoveryMarshallerCheckSelfTest.java | 94 ------------------- .../IgniteSpiDiscoverySelfTestSuite.java | 2 - 4 files changed, 11 insertions(+), 152 deletions(-) delete mode 100644 modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java index 31208262aba1b..40a0fd045fea2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java @@ -34,11 +34,9 @@ import org.apache.ignite.cache.store.CacheStoreAdapter; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.processors.cache.extras.GridCacheObsoleteEntryExtras; import org.apache.ignite.internal.processors.cache.store.CacheLocalStore; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -79,11 +77,6 @@ private CacheWriteSynchronizationMode cacheWriteSynchronizationMode() { @Override protected IgniteConfiguration getConfiguration(final String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); - if (igniteInstanceName != null && igniteInstanceName.toLowerCase().startsWith("binary")) - c.setMarshaller(new BinaryMarshaller()); - else - c.setMarshaller(new JdkMarshaller()); - c.setCacheConfiguration(cacheConfiguration()); return c; @@ -211,7 +204,8 @@ public void testBinaryStream() throws Exception { cache.destroy(); cache.close(); - assert store.map.containsKey(key); + assertEquals(1, store.map.size()); + assertEquals(key.field("id"), ((BinaryObject)store.map.keySet().iterator().next()).field("id")); final IgniteCache cache2 = grid.createCache(CACHE_NAME).withKeepBinary(); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java index 88e1717e06f80..e0ff46e67bfa9 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java @@ -20,8 +20,6 @@ import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.configuration.BinaryConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Test; @@ -30,38 +28,23 @@ * Test for {@link org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi}. */ public class TcpClientDiscoveryMarshallerCheckSelfTest extends GridCommonAbstractTest { - /** */ - private boolean testFooter; - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - if (testFooter) { - cfg.setMarshaller(new BinaryMarshaller()); - - TcpDiscoverySpi spi = new TcpDiscoverySpi(); + TcpDiscoverySpi spi = new TcpDiscoverySpi(); - spi.setJoinTimeout(-1); // IGNITE-605, and further tests limitation bypass - spi.setIpFinder(sharedStaticIpFinder); + spi.setJoinTimeout(-1); // IGNITE-605, and further tests limitation bypass + spi.setIpFinder(sharedStaticIpFinder); - cfg.setDiscoverySpi(spi); + cfg.setDiscoverySpi(spi); - if (igniteInstanceName.endsWith("0")) { - BinaryConfiguration bc = new BinaryConfiguration(); - bc.setCompactFooter(false); + if (igniteInstanceName.endsWith("0")) { + BinaryConfiguration bc = new BinaryConfiguration(); + bc.setCompactFooter(false); - cfg.setBinaryConfiguration(bc); - cfg.setClientMode(true); - } - } - else { - if (igniteInstanceName.endsWith("0")) - cfg.setMarshaller(new JdkMarshaller()); - else { - cfg.setClientMode(true); - cfg.setMarshaller(new BinaryMarshaller()); - } + cfg.setBinaryConfiguration(bc); + cfg.setClientMode(true); } return cfg; @@ -72,26 +55,6 @@ public class TcpClientDiscoveryMarshallerCheckSelfTest extends GridCommonAbstrac stopAllGrids(); } - /** - * @throws Exception If failed. - */ - @Test - public void testMarshallerInConsistency() throws Exception { - startGrid(0); - - try { - startGrid(1); - - fail("Expected SPI exception was not thrown."); - } - catch (IgniteCheckedException e) { - Throwable ex = e.getCause().getCause(); - - assertTrue(ex instanceof IgniteSpiException); - assertTrue(ex.getMessage().contains("Local node's marshaller differs from remote node's marshaller")); - } - } - /** * @throws Exception If failed. */ @@ -114,8 +77,6 @@ public void testInconsistentCompactFooterMulti() throws Exception { * @throws Exception If failed. */ private void clientServerInconsistentConfigFail(boolean multiNodes, int cnt, int iters) throws Exception { - testFooter = true; - for (int i = 1; i <= cnt; i++) startGrid(i); diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java deleted file mode 100644 index 1217fcf332fdc..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java +++ /dev/null @@ -1,94 +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.spi.discovery.tcp; - -import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; -import org.apache.ignite.spi.IgniteSpiException; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Test; - -/** - * Test for {@link TcpDiscoverySpi}. - */ -public class TcpDiscoveryMarshallerCheckSelfTest extends GridCommonAbstractTest { - /** */ - private static boolean sameMarsh; - - /** */ - private static boolean flag; - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setLocalHost("127.0.0.1"); - - if (flag) - cfg.setMarshaller(new JdkMarshaller()); - else - cfg.setMarshaller(sameMarsh ? new JdkMarshaller() : new BinaryMarshaller()); - - // Flip flag. - flag = !flag; - - return cfg; - } - - /** {@inheritDoc} */ - @Override protected void afterTest() throws Exception { - stopAllGrids(); - - flag = false; - } - - /** - * @throws Exception If failed. - */ - @Test - public void testMarshallerInConsistency() throws Exception { - sameMarsh = false; - - startGrid(1); - - try { - startGrid(2); - - fail("Expected SPI exception was not thrown."); - } - catch (IgniteCheckedException e) { - Throwable ex = e.getCause().getCause(); - - assertTrue(ex instanceof IgniteSpiException); - assertTrue(ex.getMessage().contains("Local node's marshaller differs from remote node's marshaller")); - } - } - - /** - * @throws Exception If failed. - */ - @Test - public void testMarshallerConsistency() throws Exception { - sameMarsh = true; - - startGrid(1); - startGrid(2); - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java index 1264c16124576..f0b7fbf5ce8b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSpiDiscoverySelfTestSuite.java @@ -46,7 +46,6 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoveryFailedJoinTest; import org.apache.ignite.spi.discovery.tcp.TcpDiscoveryIpFinderCleanerTest; import org.apache.ignite.spi.discovery.tcp.TcpDiscoveryIpFinderFailureTest; -import org.apache.ignite.spi.discovery.tcp.TcpDiscoveryMarshallerCheckSelfTest; import org.apache.ignite.spi.discovery.tcp.TcpDiscoveryMetricsWarnLogTest; import org.apache.ignite.spi.discovery.tcp.TcpDiscoveryMultiThreadedTest; import org.apache.ignite.spi.discovery.tcp.TcpDiscoveryNetworkIssuesTest; @@ -107,7 +106,6 @@ TcpDiscoverySpiMBeanTest.class, TcpDiscoverySpiStartStopSelfTest.class, TcpDiscoverySpiConfigSelfTest.class, - TcpDiscoveryMarshallerCheckSelfTest.class, TcpDiscoverySnapshotHistoryTest.class, TcpDiscoveryNodeJoinAndFailureTest.class, From 62fea49d0252730c88085567f697e20e6d66fe21 Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Thu, 19 Dec 2024 14:45:38 +0300 Subject: [PATCH 07/10] IGNITE-15083 WIP --- .../internal/GridLifecycleAwareSelfTest.java | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleAwareSelfTest.java index ea047b372f5b1..05f8e76e52b87 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleAwareSelfTest.java @@ -23,7 +23,6 @@ import org.apache.ignite.configuration.ConnectorConfiguration; import org.apache.ignite.configuration.ConnectorMessageInterceptor; import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.lifecycle.LifecycleAware; import org.apache.ignite.lifecycle.LifecycleBean; import org.apache.ignite.lifecycle.LifecycleEventType; @@ -102,30 +101,6 @@ private static class TestLifecycleBean extends TestLifecycleAware implements Lif } } - /** - */ - private static class TestMarshaller extends BinaryMarshaller implements LifecycleAware { - /** */ - private final TestLifecycleAware lifecycleAware = new TestLifecycleAware(null); - - /** {@inheritDoc} */ - @Override public void start() { - lifecycleAware.start(); - } - - /** {@inheritDoc} */ - @Override public void stop() { - lifecycleAware.stop(); - } - - /** - * @return Lifecycle aware. - */ - TestLifecycleAware lifecycleAware() { - return lifecycleAware; - } - } - /** */ private static class TestLogger extends JavaLogger implements LifecycleAware { @@ -182,12 +157,6 @@ TestLifecycleAware lifecycleAware() { lifecycleAwares.add(lifecycleBean); - TestMarshaller marshaller = new TestMarshaller(); - - cfg.setMarshaller(marshaller); - - lifecycleAwares.add(marshaller.lifecycleAware()); - TestLogger testLog = new TestLogger(); cfg.setGridLogger(testLog); From 05200a30fd1a1de3a5325630f8b73bf2250f1a77 Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Fri, 20 Dec 2024 12:10:54 +0300 Subject: [PATCH 08/10] IGNITE-15083 WIP --- .../OptimizedMarshallerPooledSelfTest.java | 42 --- .../OptimizedMarshallerSelfTest.java | 287 ------------------ ...shallerSerialPersistentFieldsSelfTest.java | 117 ------- .../optimized/OptimizedMarshallerTest.java | 48 --- .../cache/GridCacheP2PUndeploySelfTest.java | 286 ----------------- ...tractTest.java => GridMarshallerTest.java} | 10 +- .../jdk/GridJdkMarshallerSelfTest.java | 33 -- .../ignite/marshaller/jdk/package-info.java | 23 -- .../junits/GridAbstractTest.java | 4 +- .../testframework/junits/IgniteMock.java | 1 - .../junits/IgniteTestResources.java | 33 +- .../junits/multijvm/IgniteNodeRunner.java | 13 +- .../junits/multijvm/IgniteProcessProxy.java | 11 - .../testsuites/IgniteCacheTestSuite.java | 2 - .../IgniteMarshallerSelfTestSuite.java | 10 +- .../testsuites/IgniteReproducingSuite.java | 72 ----- 16 files changed, 13 insertions(+), 979 deletions(-) delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerPooledSelfTest.java delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java delete mode 100644 modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java rename modules/core/src/test/java/org/apache/ignite/marshaller/{GridMarshallerAbstractTest.java => GridMarshallerTest.java} (99%) delete mode 100644 modules/core/src/test/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerSelfTest.java delete mode 100644 modules/core/src/test/java/org/apache/ignite/marshaller/jdk/package-info.java delete mode 100644 modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerPooledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerPooledSelfTest.java deleted file mode 100644 index cdb8e7303cbcf..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerPooledSelfTest.java +++ /dev/null @@ -1,42 +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.internal.marshaller.optimized; - -import org.apache.ignite.marshaller.Marshaller; -import org.apache.ignite.testframework.junits.common.GridCommonTest; - -/** - * Optimized marshaller self test. - */ -@GridCommonTest(group = "Marshaller") -public class OptimizedMarshallerPooledSelfTest extends OptimizedMarshallerSelfTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - OptimizedMarshaller m = new OptimizedMarshaller(false); - - m.setPoolSize(8); - - return m; - } - - /** {@inheritDoc} */ - @Override protected void afterTestsStopped() throws Exception { - // Reset static registry. - new OptimizedMarshaller().setPoolSize(0); - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java deleted file mode 100644 index 5d8494bf7145c..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSelfTest.java +++ /dev/null @@ -1,287 +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.internal.marshaller.optimized; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.Serializable; -import java.util.concurrent.Callable; -import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.lang.IgniteRunnable; -import org.apache.ignite.marshaller.GridMarshallerAbstractTest; -import org.apache.ignite.marshaller.Marshaller; -import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testframework.junits.common.GridCommonTest; -import org.junit.Test; - -/** - * Optimized marshaller self test. - */ -@GridCommonTest(group = "Marshaller") -public class OptimizedMarshallerSelfTest extends GridMarshallerAbstractTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - return new OptimizedMarshaller(false); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testTestMarshalling() throws Exception { - final String msg = "PASSED"; - - byte[] buf = marshal(new IgniteRunnable() { - @Override public void run() { - c1.apply(msg); - c2.apply(msg); - - c3.apply(); - c4.reduce(); - - System.out.println("Test message: " + msg); - } - }); - - Runnable r = unmarshal(buf); - - assertNotNull(r); - - r.run(); - } - - /** - * Tests marshal self-linked object. - * - * @throws IgniteCheckedException If marshalling failed. - */ - @Test - public void testMarshallingSelfLink() throws IgniteCheckedException { - SelfLink sl = new SelfLink("a string 1"); - - sl.link(sl); - - SelfLink sl1 = unmarshal(marshal(sl)); - - assert sl1.link() == sl1; - } - - /** - * @throws Exception If failed. - */ - @Test - public void testInvalid() throws Exception { - GridTestUtils.assertThrows( - log, - new Callable() { - @Override public Object call() throws Exception { - byte[] arr = new byte[10]; - - arr[0] = (byte)200; - - unmarshal(arr); - - return null; - } - }, - IgniteCheckedException.class, - null - ); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testNested() throws Exception { - NestedTestObject obj = new NestedTestObject("String", 100); - - NestedTestObject newObj = unmarshal(marshal(obj)); - - assertEquals("String", newObj.str); - assertEquals(100, newObj.val); - } - - /** - * Class for nested execution test. - */ - private static class NestedTestObject implements Serializable { - /** */ - private String str; - - /** */ - private int val; - - /** - * @param str String. - * @param val Value. - */ - private NestedTestObject(String str, int val) { - this.str = str; - this.val = val; - } - - /** */ - private void writeObject(ObjectOutputStream out) throws IOException { - try { - byte[] arr = marshal(str); - - out.writeInt(arr.length); - out.write(arr); - - out.writeInt(val); - } - catch (IgniteCheckedException e) { - throw new IOException(e); - } - } - - /** */ - private void readObject(ObjectInputStream in) throws IOException { - try { - byte[] arr = new byte[in.readInt()]; - - in.read(arr); - - str = unmarshal(arr); - - val = in.readInt(); - } - catch (IgniteCheckedException e) { - throw new IOException(e); - } - } - } - - /** */ - private static class TestObject2 { - /** */ - private final int i; - - /** - * Constructor for TestObject2 instances. - * - * @param i Integer value to hold. - */ - private TestObject2(int i) { - this.i = i; - } - - /** {@inheritDoc} */ - @Override public boolean equals(Object o) { - return i == ((TestObject2)o).i; - } - - /** {@inheritDoc} */ - @Override public int hashCode() { - return i; - } - } - - /** - * Static nested class. - */ - private static class TestObject { - /** */ - private final TestObject2 o2; - - /** The only meaningful field in the class, used for {@link #equals(Object o)} and {@link #hashCode()}. */ - private final String str; - - /** - * @param str String to hold. - * @param i Integer. - */ - TestObject(String str, int i) { - this.str = str; - - o2 = new TestObject2(i); - } - - /** - * Method for accessing value of the hold string after the object is created. - * - * @return Wrapped string. - */ - public String string() { - return str; - } - - /** - * @return Object held in this wrapped. - */ - public TestObject2 obj() { - return o2; - } - - /** {@inheritDoc} */ - @Override public int hashCode() { - return 31 * o2.hashCode() + str.hashCode(); - } - - /** {@inheritDoc} */ - @SuppressWarnings("RedundantIfStatement") - @Override public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - TestObject obj = (TestObject)o; - - if (o2 != null ? !o2.equals(obj.o2) : obj.o2 != null) - return false; - - if (str != null ? !str.equals(obj.str) : obj.str != null) - return false; - - return true; - } - } - - /** - * Static nested class. - */ - private static class SelfLink extends TestObject { - /** */ - private SelfLink link; - - /** - * @param str String to hold. - */ - SelfLink(String str) { - super(str, 1); - } - - /** - * @return The object this link points to,. - */ - public SelfLink link() { - return link; - } - - /** - * @param link The object this link should points to, - */ - public void link(SelfLink link) { - this.link = link; - } - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java deleted file mode 100644 index e6e3e1dba90d4..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerSerialPersistentFieldsSelfTest.java +++ /dev/null @@ -1,117 +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.internal.marshaller.optimized; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.ObjectStreamField; -import java.io.Serializable; -import org.apache.ignite.marshaller.GridMarshallerAbstractTest; -import org.apache.ignite.marshaller.Marshaller; -import org.junit.Test; - -/** - * Test that Optimized Marshaller works with classes with serialPersistentFields. - */ -public class OptimizedMarshallerSerialPersistentFieldsSelfTest extends GridMarshallerAbstractTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - return new OptimizedMarshaller(false); - } - - /** - * @throws Exception If failed. - */ - @Test - public void testOptimizedMarshaller() throws Exception { - unmarshal(marshal(new TestClass())); - - TestClass2 val = unmarshal(marshal(new TestClass2())); - - assertNull(val.field3); - } - - /** - * Test class with serialPersistentFields fields. - */ - private static class TestClass implements Serializable { - private static final long serialVersionUID = 0L; - - /** For serialization compatibility. */ - private static final ObjectStreamField[] serialPersistentFields = { - new ObjectStreamField("field1", Integer.TYPE), - new ObjectStreamField("field2", Integer.TYPE) - }; - - /** - * @param s Object output stream. - */ - private void writeObject(ObjectOutputStream s) throws IOException { - s.putFields().put("field1", 1); - s.putFields().put("field2", 2); - s.writeFields(); - - s.writeObject(null); - } - - /** - * @param s Object input stream. - */ - private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { - s.defaultReadObject(); - - s.readObject(); - } - } - - /** - * Test class with serialPersistentFields fields. - */ - private static class TestClass2 implements Serializable { - private static final long serialVersionUID = 0L; - - /** */ - private Integer field3 = 1; - - /** For serialization compatibility. */ - private static final ObjectStreamField[] serialPersistentFields = { - new ObjectStreamField("field1", Integer.TYPE), - new ObjectStreamField("field2", Integer.TYPE) - }; - - /** - * @param s Object output stream. - */ - private void writeObject(ObjectOutputStream s) throws IOException { - s.putFields().put("field1", 1); - s.putFields().put("field2", 2); - s.writeFields(); - - s.writeObject(null); - } - - /** - * @param s Object input stream. - */ - private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { - s.defaultReadObject(); - - s.readObject(); - } - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java index d9660323425c3..6b0fc73977eb9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerTest.java @@ -29,12 +29,8 @@ import java.util.Arrays; import java.util.Collection; import java.util.concurrent.Callable; -import java.util.concurrent.ConcurrentMap; -import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.compute.ComputeJobAdapter; -import org.apache.ignite.compute.ComputeTask; -import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.marshaller.GridMarshallerTestInheritedBean; import org.apache.ignite.marshaller.Marshaller; @@ -288,50 +284,6 @@ public void testProxy() throws IgniteCheckedException { assertEquals(outItf.checkAfterUnmarshalled(), 17); } - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration configuration = super.getConfiguration(igniteInstanceName); - configuration.setMarshaller(marshaller()); - return configuration; - } - - /** - * @throws Exception If failed. - */ - @Test - public void testDescriptorCache() throws Exception { - try { - Ignite ignite = startGridsMultiThreaded(2); - - String taskClsName = "org.apache.ignite.tests.p2p.classic.SingleSplitTestTask"; - String jobClsName = "org.apache.ignite.tests.p2p.classic.SingleSplitTestTask$SingleSplitTestJob"; - - ClassLoader ldr = getExternalClassLoader(); - - Class> taskCls = (Class>)ldr.loadClass(taskClsName); - Class> jobCls = (Class>)ldr.loadClass(jobClsName); - - ignite.compute().localDeployTask(taskCls, ldr); - - ignite.compute().execute(taskClsName, 2); - - ConcurrentMap, OptimizedClassDescriptor> cache = - U.field(ignite.configuration().getMarshaller(), "clsMap"); - - assertTrue(cache.containsKey(jobCls)); - - ignite.compute().undeployTask(taskClsName); - - // Wait for undeploy. - Thread.sleep(1000); - - assertFalse(cache.containsKey(jobCls)); - } - finally { - stopAllGrids(); - } - } - /** * @throws Exception If failed. */ diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java deleted file mode 100644 index be01329ca87c5..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java +++ /dev/null @@ -1,286 +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.internal.processors.cache; - -import java.util.concurrent.atomic.AtomicInteger; -import com.google.common.collect.ImmutableSet; -import org.apache.ignite.Ignite; -import org.apache.ignite.IgniteCache; -import org.apache.ignite.IgniteCheckedException; -import org.apache.ignite.cache.CacheRebalanceMode; -import org.apache.ignite.cache.CacheWriteSynchronizationMode; -import org.apache.ignite.configuration.CacheConfiguration; -import org.apache.ignite.configuration.IgniteConfiguration; -import org.apache.ignite.internal.IgniteKernal; -import org.apache.ignite.internal.processors.cache.distributed.GridCacheModuloAffinityFunction; -import org.apache.ignite.internal.util.lang.GridAbsPredicate; -import org.apache.ignite.internal.util.typedef.F; -import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.marshaller.jdk.JdkMarshaller; -import org.apache.ignite.testframework.GridTestUtils; -import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.junit.Ignore; -import org.junit.Test; - -import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; -import static org.apache.ignite.cache.CacheMode.PARTITIONED; -import static org.apache.ignite.cache.CacheMode.REPLICATED; -import static org.apache.ignite.cache.CacheRebalanceMode.NONE; -import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; -import static org.apache.ignite.configuration.DeploymentMode.SHARED; - -/** - * - */ -@Ignore("https://issues.apache.org/jira/browse/IGNITE-10420") -public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest { - /** Test p2p value. */ - private static final String TEST_VALUE = "org.apache.ignite.tests.p2p.GridCacheDeploymentTestValue3"; - - /** */ - private final AtomicInteger idxGen = new AtomicInteger(); - - /** */ - private CacheRebalanceMode mode = SYNC; - - /** */ - private boolean offheap; - - /** {@inheritDoc} */ - @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { - IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - - cfg.setNetworkTimeout(2000); - - cfg.setMarshaller(new JdkMarshaller()); - - CacheConfiguration repCacheCfg = defaultCacheConfiguration(); - - repCacheCfg.setName("replicated"); - repCacheCfg.setCacheMode(REPLICATED); - repCacheCfg.setRebalanceMode(mode); - repCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); - repCacheCfg.setAtomicityMode(TRANSACTIONAL); - - CacheConfiguration partCacheCfg = defaultCacheConfiguration(); - - partCacheCfg.setName("partitioned"); - partCacheCfg.setCacheMode(PARTITIONED); - partCacheCfg.setRebalanceMode(mode); - partCacheCfg.setAffinity(new GridCacheModuloAffinityFunction(11, 1)); - partCacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC); - partCacheCfg.setAtomicityMode(TRANSACTIONAL); - - cfg.setCacheConfiguration(repCacheCfg, partCacheCfg); - - cfg.setDeploymentMode(SHARED); - cfg.setPeerClassLoadingLocalClassPathExclude(GridCacheP2PUndeploySelfTest.class.getName()); - - cfg.setUserAttributes(F.asMap(GridCacheModuloAffinityFunction.IDX_ATTR, idxGen.getAndIncrement())); - - return cfg; - } - - /** @throws Exception If failed. */ - @Test - public void testSwapP2PReplicated() throws Exception { - offheap = false; - - checkP2PUndeploy("replicated"); - } - - /** @throws Exception If failed. */ - @Test - public void testOffHeapP2PReplicated() throws Exception { - offheap = true; - - checkP2PUndeploy("replicated"); - } - - /** @throws Exception If failed. */ - @Test - public void testSwapP2PPartitioned() throws Exception { - offheap = false; - - checkP2PUndeploy("partitioned"); - } - - /** @throws Exception If failed. */ - @Test - public void testOffheapP2PPartitioned() throws Exception { - offheap = true; - - checkP2PUndeploy("partitioned"); - } - - /** @throws Exception If failed. */ - @Test - public void testSwapP2PReplicatedNoPreloading() throws Exception { - mode = NONE; - offheap = false; - - checkP2PUndeploy("replicated"); - } - - /** @throws Exception If failed. */ - @Test - public void testOffHeapP2PReplicatedNoPreloading() throws Exception { - mode = NONE; - offheap = true; - - checkP2PUndeploy("replicated"); - } - - /** @throws Exception If failed. */ - @Test - public void testSwapP2PPartitionedNoPreloading() throws Exception { - mode = NONE; - offheap = false; - - checkP2PUndeploy("partitioned"); - } - - /** @throws Exception If failed. */ - @Test - public void testOffHeapP2PPartitionedNoPreloading() throws Exception { - mode = NONE; - offheap = true; - - checkP2PUndeploy("partitioned"); - } - - /** - * @param cacheName Cache name. - * @param g Grid. - * @return Size. - * @throws IgniteCheckedException If failed. - */ - private long size(String cacheName, IgniteKernal g) throws IgniteCheckedException { - if (offheap) - return ((IgniteKernal)g).getCache(cacheName).offHeapEntriesCount(); - - return 0; - // TODO GG-10884. - // return g.context().swap().swapSize(swapSpaceName(cacheName, g)); - } - - /** - * @param cacheName Cache name. - * @throws Exception If failed. - */ - private void checkP2PUndeploy(final String cacheName) throws Exception { - assert !F.isEmpty(cacheName); - - ClassLoader ldr = getExternalClassLoader(); - - Class valCls = ldr.loadClass(TEST_VALUE); - - try { - Ignite ignite1 = startGrid(1); - final IgniteKernal grid2 = (IgniteKernal)startGrid(2); - - IgniteCache cache1 = ignite1.cache(cacheName); - IgniteCache cache2 = grid2.cache(cacheName); - - Object v1 = valCls.newInstance(); - - cache1.put(1, v1); - cache1.put(2, valCls.newInstance()); - cache1.put(3, valCls.newInstance()); - cache1.put(4, valCls.newInstance()); - - info("Stored value in cache1 [v=" + v1 + ", ldr=" + v1.getClass().getClassLoader() + ']'); - - Object v2 = cache2.get(1); - - assert v2 != null; - - info("Read value from cache2 [v=" + v2 + ", ldr=" + v2.getClass().getClassLoader() + ']'); - - assert v2 != null; - assert v2.toString().equals(v1.toString()); - assert !v2.getClass().getClassLoader().equals(getClass().getClassLoader()); - assert v2.getClass().getClassLoader().getClass().getName().contains("GridDeploymentClassLoader"); - - cache2.localEvict(ImmutableSet.of(2, 3, 4)); - - //Wait until entries stored to disk. - GridTestUtils.waitForCondition(new GridAbsPredicate() { - @Override public boolean apply() { - try { - return size(cacheName, grid2) > 0; - } - catch (IgniteCheckedException e) { - throw new AssertionError(e); - } - } - }, 5000); - - stopGrid(1); - - assert waitCacheEmpty(cache2, 10000); - - for (int i = 0; i < 3; i++) { - long swapSize = size(cacheName, grid2); - - if (swapSize > 0) { - if (i < 2) { - U.warn(log, "Swap size check failed (will retry in 1000 ms): " + swapSize); - - U.sleep(1000); - - continue; - } - - fail("Swap size check failed: " + swapSize); - } - else if (swapSize == 0) - break; - else - assert false : "Negative swap size: " + swapSize; - } - } - finally { - stopAllGrids(); - } - } - - /** - * @param cache Cache. - * @param timeout Timeout. - * @return {@code True} if success. - * @throws InterruptedException If thread was interrupted. - */ - @SuppressWarnings({"BusyWait"}) - private boolean waitCacheEmpty(IgniteCache cache, long timeout) - throws InterruptedException { - assert cache != null; - assert timeout >= 0; - - long end = System.currentTimeMillis() + timeout; - - while (end - System.currentTimeMillis() >= 0) { - if (cache.localSize() == 0) - return true; - - Thread.sleep(500); - } - - return cache.localSize() == 0; - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerTest.java similarity index 99% rename from modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java rename to modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerTest.java index 0855226483abe..3401bf05040c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/marshaller/GridMarshallerTest.java @@ -82,7 +82,7 @@ /** * Common test for marshallers. */ -public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest implements Serializable { +public class GridMarshallerTest extends GridCommonAbstractTest implements Serializable { /** */ private static final String CACHE_NAME = "namedCache"; @@ -125,7 +125,7 @@ public abstract class GridMarshallerAbstractTest extends GridCommonAbstractTest }; /** */ - protected GridMarshallerAbstractTest() { + public GridMarshallerTest() { super(/*start grid*/true); } @@ -138,17 +138,11 @@ protected GridMarshallerAbstractTest() { namedCache.setName(CACHE_NAME); namedCache.setAtomicityMode(TRANSACTIONAL); - cfg.setMarshaller(marshaller()); cfg.setCacheConfiguration(new CacheConfiguration(DEFAULT_CACHE_NAME), namedCache); return cfg; } - /** - * @return Marshaller. - */ - protected abstract Marshaller marshaller(); - /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { marsh = grid().configuration().getMarshaller(); diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerSelfTest.java deleted file mode 100644 index ff7726dfcc4b5..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/jdk/GridJdkMarshallerSelfTest.java +++ /dev/null @@ -1,33 +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.marshaller.jdk; - -import org.apache.ignite.marshaller.GridMarshallerAbstractTest; -import org.apache.ignite.marshaller.Marshaller; -import org.apache.ignite.testframework.junits.common.GridCommonTest; - -/** - * JDK marshaller self test. - */ -@GridCommonTest(group = "Marshaller") -public class GridJdkMarshallerSelfTest extends GridMarshallerAbstractTest { - /** {@inheritDoc} */ - @Override protected Marshaller marshaller() { - return new JdkMarshaller(); - } -} diff --git a/modules/core/src/test/java/org/apache/ignite/marshaller/jdk/package-info.java b/modules/core/src/test/java/org/apache/ignite/marshaller/jdk/package-info.java deleted file mode 100644 index ffff7b8709e25..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/marshaller/jdk/package-info.java +++ /dev/null @@ -1,23 +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. - */ - -/** - * - * TODO. - */ - -package org.apache.ignite.marshaller.jdk; 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 d7a1d9072fc55..339e57580c6af 100755 --- 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 @@ -2076,6 +2076,9 @@ public boolean isDebug() { */ @SuppressWarnings({"IfMayBeConditional"}) protected String getDefaultCheckpointPath(Marshaller marshaller) { + if (marshaller == null) + marshaller = new BinaryMarshaller(); + if (marshaller instanceof JdkMarshaller) return SharedFsCheckpointSpi.DFLT_DIR_PATH + "/jdk/"; else @@ -2112,7 +2115,6 @@ protected IgniteConfiguration getConfiguration(String igniteInstanceName, Ignite cfg.setIgniteInstanceName(igniteInstanceName); cfg.setGridLogger(rsrcs.getLogger()); - cfg.setMarshaller(rsrcs.getMarshaller()); cfg.setNodeId(rsrcs.getNodeId()); cfg.setIgniteHome(rsrcs.getIgniteHome()); cfg.setMBeanServer(rsrcs.getMBeanServer()); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java index f308f61a89e4e..8b23d7784dd47 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java @@ -166,7 +166,6 @@ public IgniteMock( IgniteConfiguration cfg = new IgniteConfiguration(); - cfg.setMarshaller(marshaller); cfg.setNodeId(nodeId); cfg.setMBeanServer(jmx); cfg.setIgniteHome(home); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java index 6325a4000d6c3..80d3719087457 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteTestResources.java @@ -46,9 +46,6 @@ * Test resources for injection. */ public class IgniteTestResources { - /** Marshaller class name. */ - public static final String MARSH_CLASS_NAME = "test.marshaller.class"; - /** */ private static final IgniteLogger rootLog = new GridTestLog4jLogger(false); @@ -251,33 +248,13 @@ public String getLocalHost() { * @throws IgniteCheckedException If failed. */ public static synchronized Marshaller getMarshaller() throws IgniteCheckedException { - String marshallerName = System.getProperty(MARSH_CLASS_NAME); - - Marshaller marsh; - - if (marshallerName == null) - marsh = new BinaryMarshaller(); - else { - try { - Class cls = (Class)Class.forName(marshallerName); - - marsh = cls.newInstance(); - } - catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) { - throw new IgniteCheckedException("Failed to create test marshaller [marshaller=" + - marshallerName + ']', e); - } - } + BinaryMarshaller marsh = new BinaryMarshaller(); marsh.setContext(new MarshallerContextTestImpl()); - - if (marsh instanceof BinaryMarshaller) { - BinaryMarshaller binaryMarsh = (BinaryMarshaller)marsh; - - BinaryContext ctx = - new BinaryContext(BinaryCachingMetadataHandler.create(), new IgniteConfiguration(), new NullLogger()); - binaryMarsh.setBinaryContext(ctx, new IgniteConfiguration()); - } + marsh.setBinaryContext( + new BinaryContext(BinaryCachingMetadataHandler.create(), new IgniteConfiguration(), new NullLogger()), + new IgniteConfiguration() + ); return marsh; } diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteNodeRunner.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteNodeRunner.java index b9fa2db1b67a3..030542254a633 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteNodeRunner.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteNodeRunner.java @@ -38,9 +38,7 @@ import org.apache.ignite.internal.util.GridJavaProcess; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; -import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; -import org.apache.ignite.testframework.junits.IgniteTestResources; import sun.jvmstat.monitor.HostIdentifier; import sun.jvmstat.monitor.MonitoredHost; import sun.jvmstat.monitor.MonitoredVm; @@ -136,21 +134,12 @@ public static void storeToFile(IgniteConfiguration cfg, String fileName, * @return Readed configuration. * @throws IOException If failed. * @see #storeToFile(IgniteConfiguration, boolean) - * @throws IgniteCheckedException On error. */ private static IgniteConfiguration readCfgFromFileAndDeleteFile(String fileName) - throws IOException, IgniteCheckedException { + throws IOException { try (BufferedReader cfgReader = new BufferedReader(new FileReader(fileName))) { IgniteConfiguration cfg = (IgniteConfiguration)new XStream().fromXML(cfgReader); - if (cfg.getMarshaller() == null) { - Marshaller marsh = IgniteTestResources.getMarshaller(); - - cfg.setMarshaller(marsh); - } - - X.println("Configured marshaller class: " + cfg.getMarshaller().getClass().getName()); - if (cfg.getDiscoverySpi() == null) { TcpDiscoverySpi disco = new TcpDiscoverySpi(); disco.setIpFinder(GridCacheAbstractFullApiSelfTest.LOCAL_IP_FINDER); diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java index d37200cdd591e..7ccf15f67733f 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java @@ -74,7 +74,6 @@ import org.apache.ignite.internal.GridKernalContext; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInterruptedCheckedException; -import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.cluster.IgniteClusterEx; import org.apache.ignite.internal.management.IgniteCommandRegistry; import org.apache.ignite.internal.processors.cache.GridCacheUtilityKey; @@ -91,13 +90,11 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.lang.IgniteProductVersion; import org.apache.ignite.lang.IgniteRunnable; -import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.metric.IgniteMetrics; import org.apache.ignite.plugin.IgnitePlugin; import org.apache.ignite.plugin.PluginNotFoundException; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.spi.tracing.TracingConfigurationManager; -import org.apache.ignite.testframework.junits.IgniteTestResources; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -277,17 +274,9 @@ protected Collection filteredJvmArgs() throws Exception { filteredJvmArgs.add("-ea"); - Marshaller marsh = cfg.getMarshaller(); - - if (marsh != null) - filteredJvmArgs.add("-D" + IgniteTestResources.MARSH_CLASS_NAME + "=" + marsh.getClass().getName()); - else - filteredJvmArgs.add("-D" + IgniteTestResources.MARSH_CLASS_NAME + "=" + BinaryMarshaller.class.getName()); - for (String arg : U.jvmArgs()) { if (arg.startsWith("-Xmx") || arg.startsWith("-Xms") || arg.startsWith("-cp") || arg.startsWith("-classpath") || - (marsh != null && arg.startsWith("-D" + IgniteTestResources.MARSH_CLASS_NAME)) || arg.startsWith("--add-opens") || arg.startsWith("--add-exports") || arg.startsWith("--add-modules") || arg.startsWith("--patch-module") || arg.startsWith("--add-reads") || arg.startsWith("-XX:+IgnoreUnrecognizedVMOptions")) 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 836f0a001b6bc..fff7dd11c1a69 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 @@ -54,7 +54,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheConfigurationValidationSelfTest; import org.apache.ignite.internal.processors.cache.GridCacheEntryMemorySizeSelfTest; import org.apache.ignite.internal.processors.cache.GridCacheObjectToStringSelfTest; -import org.apache.ignite.internal.processors.cache.GridCacheP2PUndeploySelfTest; import org.apache.ignite.internal.processors.cache.GridCacheStoreValueBytesSelfTest; import org.apache.ignite.internal.processors.cache.GridCacheTtlManagerSelfTest; import org.apache.ignite.internal.processors.cache.GridDataStorageConfigurationConsistencySelfTest; @@ -163,7 +162,6 @@ public static List> suite(Collection ignoredTests) { GridTestUtils.addTestIfNeeded(suite, GridCacheAffinityMapperSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, CacheAffinityCallSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheAffinityRoutingSelfTest.class, ignoredTests); - GridTestUtils.addTestIfNeeded(suite, GridCacheP2PUndeploySelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheConfigurationValidationSelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, GridCacheConfigurationConsistencySelfTest.class, ignoredTests); GridTestUtils.addTestIfNeeded(suite, CacheAffinityKeyConfigurationMismatchTest.class, ignoredTests); diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java index faa4e44e29fa4..a67e03ff72de3 100644 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java +++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteMarshallerSelfTestSuite.java @@ -21,17 +21,14 @@ import org.apache.ignite.internal.direct.stream.DirectByteBufferStreamImplByteOrderSelfTest; 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.util.GridHandleTableSelfTest; import org.apache.ignite.internal.util.io.GridUnsafeDataInputOutputByteOrderSelfTest; import org.apache.ignite.internal.util.io.GridUnsafeDataOutputArraySizingSelfTest; +import org.apache.ignite.marshaller.GridMarshallerTest; import org.apache.ignite.marshaller.MarshallerEnumDeadlockMultiJvmTest; import org.apache.ignite.marshaller.ObjectInputStreamFilteringTest; -import org.apache.ignite.marshaller.jdk.GridJdkMarshallerSelfTest; import org.junit.runner.RunWith; import org.junit.runners.Suite; @@ -40,18 +37,15 @@ */ @RunWith(Suite.class) @Suite.SuiteClasses({ + GridMarshallerTest.class, GridUnsafeDataOutputArraySizingSelfTest.class, - GridJdkMarshallerSelfTest.class, OptimizedMarshallerEnumSelfTest.class, - OptimizedMarshallerSelfTest.class, OptimizedMarshallerTest.class, OptimizedObjectStreamSelfTest.class, GridUnsafeDataInputOutputByteOrderSelfTest.class, OptimizedMarshallerNodeFailoverTest.class, - OptimizedMarshallerSerialPersistentFieldsSelfTest.class, DirectByteBufferStreamImplByteOrderSelfTest.class, GridHandleTableSelfTest.class, - OptimizedMarshallerPooledSelfTest.class, MarshallerEnumDeadlockMultiJvmTest.class, DirectMarshallingMessagesTest.class, ObjectInputStreamFilteringTest.class, diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java deleted file mode 100644 index f1b2bc93e9ba6..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteReproducingSuite.java +++ /dev/null @@ -1,72 +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 java.util.ArrayList; -import java.util.List; -import org.apache.ignite.internal.marshaller.optimized.OptimizedMarshallerPooledSelfTest; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.model.InitializationError; - -/** - * Test suite for cycled run tests on PR code.
- * This empty suite may be used in case it is needed to run - * some test subset to reproduce an issue.
- * - * You may launch and check results on - * https://ci.ignite.apache.org/viewType.html?buildTypeId=Ignite20Tests_IgniteReproducingSuite - * - * This suite is not included into main build. - */ -@RunWith(IgniteReproducingSuite.DynamicReproducingSuite.class) -public class IgniteReproducingSuite { - /** */ - public static class DynamicReproducingSuite extends Suite { - /** - * @return List of test(s) for reproduction some problem. - */ - private static List> classes() { - List> suite = new ArrayList<>(); - - suite.add(IgniteReproducingSuite.TestStub.class); - - //uncomment to add some test - for (int i = 0; i < 500; i++) - suite.add(OptimizedMarshallerPooledSelfTest.class); - - return suite; - } - - /** */ - public DynamicReproducingSuite(Class cls) throws InitializationError { - super(cls, classes().toArray(new Class[] {null})); - } - } - - /** IMPL NOTE execution of the (empty) test suite was failing with NPE without this stub. */ - @Ignore - public static class TestStub { - /** */ - @Test - public void dummy() { - } - } -} From b3927d1ab68a5cc9e9610f367fe78b8fe9b5a613 Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Fri, 20 Dec 2024 12:18:06 +0300 Subject: [PATCH 09/10] IGNITE-15083 WIP --- .../optimized/OptimizedMarshallerNodeFailoverTest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java index 51cd1f9c9996f..9671ec5e7035f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java @@ -50,11 +50,8 @@ public class OptimizedMarshallerNodeFailoverTest extends GridCommonAbstractTest @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); - //cfg.setMarshaller(new OptimizedMarshaller()); - cfg.setWorkDirectory(workDir); - if (cache) { CacheConfiguration ccfg = new CacheConfiguration(DEFAULT_CACHE_NAME); From f5509f3abec9f2c6ff141d08bd89ff65b9fab74c Mon Sep 17 00:00:00 2001 From: Nikolay Izhikov Date: Sat, 21 Dec 2024 10:33:48 +0300 Subject: [PATCH 10/10] IGNITE-15083 WIP --- .../cache/GridCacheStoreManagerDeserializationTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java index 40a0fd045fea2..db5dc817d63ac 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java @@ -136,12 +136,15 @@ public void testStream() throws Exception { cache.destroy(); cache.close(); - assert store.map.containsKey(testObj); + assertEquals(1, store.map.size()); + assertEquals(testObj.val, ((BinaryObject)store.map.keySet().iterator().next()).field("val")); final IgniteCache cache2 = grid.createCache(CACHE_NAME); assert testObj.equals(cache2.get(testObj)); - assert store.map.containsKey(testObj); + + assertEquals(1, store.map.size()); + assertEquals(testObj.val, ((BinaryObject)store.map.keySet().iterator().next()).field("val")); } /**