Vladsz83 commented on code in PR #13434:
URL: https://github.com/apache/ignite/pull/13434#discussion_r3714679603


##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/message/CalciteCommunicationMessageSerializationTest.java:
##########
@@ -20,10 +20,16 @@
 import org.apache.ignite.internal.managers.AbstractMessageSerializationTest;
 import 
org.apache.ignite.plugin.extensions.communication.MessageFactoryProvider;
 
+import static org.apache.ignite.marshaller.Marshallers.jdk;
+
 /** */
 public class CalciteCommunicationMessageSerializationTest extends 
AbstractMessageSerializationTest {
     /** {@inheritDoc} */
     @Override protected MessageFactoryProvider messageFactory() {
-        return new CalciteMessageFactory();
+        CalciteMessageFactory msgFactory = new CalciteMessageFactory();
+
+        msgFactory.init(jdk(), jdk());

Review Comment:
   Same: two `Marshallers.jdk()`. 



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/PlanExecutionTest.java:
##########
@@ -82,8 +83,12 @@ public class PlanExecutionTest extends AbstractPlannerTest {
     @Override protected void beforeTest() throws Exception {
         super.beforeTest();
 
+        CalciteMessageFactory msgFactory = new CalciteMessageFactory();
+
+        msgFactory.init(jdk(), jdk());

Review Comment:
   Same



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/planner/PlanExecutionTest.java:
##########
@@ -82,8 +83,12 @@ public class PlanExecutionTest extends AbstractPlannerTest {
     @Override protected void beforeTest() throws Exception {
         super.beforeTest();
 
+        CalciteMessageFactory msgFactory = new CalciteMessageFactory();
+
+        msgFactory.init(jdk(), jdk());
+
         // Register messages in Message#REGISTRATIONS and avoids failure in 
Message#directType().
-        new IgniteMessageFactoryImpl(new MessageFactoryProvider[]{new 
CalciteMessageFactory()});
+        new IgniteMessageFactoryImpl(new MessageFactoryProvider[]{msgFactory});

Review Comment:
   Lets either add `assert marsh != null` as first line in 
`AbstractMarshallableMessageFactoryProvider#register(IgniteMessageFactory 
factory, Class<T> cls, short id, Marshaller marsh) ` or mark it `@Nullable`



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/ContinuousExecutionTest.java:
##########
@@ -40,6 +40,8 @@
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameter;
 
+import static org.apache.ignite.marshaller.Marshallers.jdk;

Review Comment:
   I prefer to avoid such imports. Two `Marshallers.jdk()` is nice. Up to you



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to