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); 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/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/marshaller/optimized/OptimizedMarshallerNodeFailoverTest.java index 873fe8882e3d0..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,8 +50,6 @@ 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) { 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/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 deleted file mode 100644 index 764f46fcc2dc4..0000000000000 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java +++ /dev/null @@ -1,298 +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); - - // TODO GG-10884. -// if (offheap) -// repCacheCfg.setOffHeapMaxMemory(OFFHEAP); -// else -// repCacheCfg.setSwapEnabled(true); - - 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); - - // TODO GG-10884. -// if (offheap) -// partCacheCfg.setOffHeapMaxMemory(OFFHEAP); -// else -// partCacheCfg.setSwapEnabled(true); - - 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/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStoreManagerDeserializationTest.java index 31208262aba1b..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 @@ -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; @@ -143,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")); } /** @@ -211,7 +207,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/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/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/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/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/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/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/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 7cc2a892610bf..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; @@ -99,7 +97,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 +107,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); @@ -141,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 e5c3c6b44a978..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; @@ -85,7 +84,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 +130,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); @@ -165,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() { - } - } -} 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, 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, 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/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 78e2896767e59..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 @@ -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; @@ -95,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; @@ -221,7 +219,6 @@ // Unmarshalling query test. IgniteCacheP2pUnmarshallingQueryErrorTest.class, - IgniteCacheNoClassQuerySelfTest.class, // Cancellation. IgniteCacheDistributedQueryCancelSelfTest.class, @@ -259,7 +256,6 @@ H2ConnectionLeaksSelfTest.class, H2ConnectionSettingsTest.class, IgniteCheckClusterStateBeforeExecuteQueryTest.class, - OptimizedMarshallerIndexNameTest.class, SqlSystemViewsSelfTest.class, ScanQueryConcurrentUpdatesTest.class, ScanQueryConcurrentSqlUpdatesTest.class,