This is an automated email from the ASF dual-hosted git repository.

yingjie pushed a commit to branch release-1.17
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.17 by this push:
     new 4e528036e70 [FLINK-31418][network][tests] Fix unstable test case 
SortMergeResultPartitionReadSchedulerTest.testRequestBufferTimeout
4e528036e70 is described below

commit 4e528036e70a9909b4cf1525be2e1e56da2d22f8
Author: Yuxin Tan <tanyuxinw...@gmail.com>
AuthorDate: Tue Mar 14 17:55:20 2023 +0800

    [FLINK-31418][network][tests] Fix unstable test case 
SortMergeResultPartitionReadSchedulerTest.testRequestBufferTimeout
    
    This closes #22172.
---
 .../network/partition/SortMergeResultPartitionReadSchedulerTest.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartitionReadSchedulerTest.java
 
b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartitionReadSchedulerTest.java
index 0d1613e1401..a3b459f0f8f 100644
--- 
a/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartitionReadSchedulerTest.java
+++ 
b/flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartitionReadSchedulerTest.java
@@ -266,16 +266,16 @@ class SortMergeResultPartitionReadSchedulerTest {
         SortMergeResultPartitionReadScheduler readScheduler =
                 new SortMergeResultPartitionReadScheduler(
                         bufferPool, executorService, this, 
bufferRequestTimeout);
+        long startTimestamp = System.nanoTime();
         readScheduler.createSubpartitionReader(
                 new NoOpBufferAvailablityListener(), 0, partitionedFile);
         // request and use all buffers of buffer pool.
         readScheduler.run();
 
         assertThat(bufferPool.getAvailableBuffers()).isZero();
-        long startTimestamp = System.nanoTime();
         
assertThatThrownBy(readScheduler::allocateBuffers).isInstanceOf(TimeoutException.class);
         long requestDuration = System.nanoTime() - startTimestamp;
-        assertThat(requestDuration > bufferRequestTimeout.toNanos()).isTrue();
+        assertThat(requestDuration >= bufferRequestTimeout.toNanos()).isTrue();
 
         readScheduler.release();
     }

Reply via email to