Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGNITE-15083 Remove setMarshaller from tests #11759

Closed
wants to merge 14 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

This file was deleted.

Loading
Loading