zentol commented on a change in pull request #8416: [FLINK-12331] Introduce 
partition/gate setup to decouple task registration with NetworkEnvironment
URL: https://github.com/apache/flink/pull/8416#discussion_r284670894
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/InputChannelTestUtils.java
 ##########
 @@ -124,4 +171,25 @@ public static InputChannelMetrics 
newUnregisteredInputChannelMetrics() {
 
        /** This class is not meant to be instantiated. */
        private InputChannelTestUtils() {}
+
+       /** Test stub for {@link MemorySegmentProvider}. */
+       public static class StubMemorySegmentProvider implements 
MemorySegmentProvider {
+               private static final MemorySegmentProvider INSTANCE = new 
StubMemorySegmentProvider();
+
+               public static MemorySegmentProvider getInstance() {
+                       return INSTANCE;
+               }
+
+               private StubMemorySegmentProvider() {
+               }
+
+               @Override
+               public Collection<MemorySegment> requestMemorySegments() {
+                       return null;
 
 Review comment:
   seems safer to return an empty collection here?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to