anton-vinogradov commented on code in PR #13454:
URL: https://github.com/apache/ignite/pull/13454#discussion_r3750840229
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java:
##########
@@ -88,6 +89,16 @@ public class DataStreamerImplSelfTest extends
GridCommonAbstractTest {
/** Indicates whether we need to make the topology stale */
private static boolean needStaleTop = false;
+ /** Receiver carriers of the streamer requests sent since the current test
started; {@code null} for the isolated one. */
+ private static final List<DataStreamerReceiverMessage> sentReceivers =
Collections.synchronizedList(new ArrayList<>());
+
+ /** {@inheritDoc} */
+ @Override protected void beforeTest() throws Exception {
+ super.beforeTest();
+
+ sentReceivers.clear();
Review Comment:
Moved into the helper both tests now use, so the rest of the class no longer
clears a collection it does not look at.
##########
modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java:
##########
@@ -142,6 +153,71 @@ public void testCloseWithCancellation() throws Exception {
assertTrue(fut.isDone());
}
+ /**
+ * The receiver does not change between batches, so it is marshalled once:
every request carries the very bytes
+ * produced for the first one.
+ *
+ * @throws Exception If failed.
+ */
+ @Test
+ public void testReceiverMarshalledOncePerStreamer() throws Exception {
Review Comment:
The two tests differed only in the receiver and in the assertions, so the
shared part is a helper now:
```java
private void streamToRemoteNode(@Nullable StreamReceiver<Object, Object>
rcvr) throws Exception
```
What is left in each test is what it actually checks: one that a user
receiver is marshalled once and every request carries those same bytes, the
other that the default receiver travels as no carrier at all and the data still
lands.
--
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]