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

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 5098f11c7 [test] Fix unstable AsyncRecordReaderTest
5098f11c7 is described below

commit 5098f11c703260101456543cfb78d400f27391a7
Author: Jingsong <[email protected]>
AuthorDate: Mon Oct 30 10:39:03 2023 +0800

    [test] Fix unstable AsyncRecordReaderTest
---
 .../test/java/org/apache/paimon/utils/AsyncRecordReaderTest.java   | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git 
a/paimon-core/src/test/java/org/apache/paimon/utils/AsyncRecordReaderTest.java 
b/paimon-core/src/test/java/org/apache/paimon/utils/AsyncRecordReaderTest.java
index 41039aabb..89e8c561b 100644
--- 
a/paimon-core/src/test/java/org/apache/paimon/utils/AsyncRecordReaderTest.java
+++ 
b/paimon-core/src/test/java/org/apache/paimon/utils/AsyncRecordReaderTest.java
@@ -29,7 +29,6 @@ import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Queue;
-import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -45,7 +44,6 @@ public class AsyncRecordReaderTest {
         queue.add(Arrays.asList(4, 6, 8));
         queue.add(Arrays.asList(9, 1));
         AtomicInteger released = new AtomicInteger(0);
-        AtomicBoolean closed = new AtomicBoolean(false);
         RecordReader<Integer> reader =
                 new RecordReader<Integer>() {
                     @Nullable
@@ -71,9 +69,7 @@ public class AsyncRecordReaderTest {
                     }
 
                     @Override
-                    public void close() {
-                        closed.set(true);
-                    }
+                    public void close() {}
                 };
 
         AsyncRecordReader<Integer> asyncReader = new AsyncRecordReader<>(() -> 
reader);
@@ -81,7 +77,6 @@ public class AsyncRecordReaderTest {
         asyncReader.forEachRemaining(results::add);
         assertThat(results).containsExactly(1, 5, 6, 4, 6, 8, 9, 1);
         assertThat(released.get()).isEqualTo(3);
-        assertThat(closed.get()).isTrue();
     }
 
     @Test

Reply via email to