pnowojski commented on a change in pull request #6555: [FLINK-10142][network] 
reduce locking around credit notification
URL: https://github.com/apache/flink/pull/6555#discussion_r210920974
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannelTest.java
 ##########
 @@ -170,6 +170,65 @@ public Void call() throws Exception {
                }
        }
 
+       @Test
+       public void testConcurrentNotifyBufferAvailableAndRelease() throws 
Exception {
+               // Config
+               // Repeatedly spawn two tasks: one to notify buffer 
availability and the other to release the channel
+               // concurrently. We do this repeatedly to provoke races.
+               final int numberOfRepetitions = 1024;
+
+               // Setup
+               final ExecutorService executor = 
Executors.newFixedThreadPool(2);
+               final Buffer buffer = 
TestBufferFactory.createBuffer(TestBufferFactory.BUFFER_SIZE);
+
+               try {
+                       // Test
+                       final SingleInputGate inputGate = 
mock(SingleInputGate.class);
 
 Review comment:
   Please no mockito in new tests. Use real object or create proper mock. It 
should be easy to replace this one.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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