From a1c94ab2367da179511afffdb9d17c99f3cadff2 Mon Sep 17 00:00:00 2001 From: Jingsong Date: Sun, 7 Apr 2024 13:09:35 +0800 Subject: [PATCH] [test] Fix unstable test: IndexBootstrapTest.testBoostrap --- .../org/apache/paimon/crosspartition/IndexBootstrapTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paimon-core/src/test/java/org/apache/paimon/crosspartition/IndexBootstrapTest.java b/paimon-core/src/test/java/org/apache/paimon/crosspartition/IndexBootstrapTest.java index 50df6e4971ec..a96ee1429740 100644 --- a/paimon-core/src/test/java/org/apache/paimon/crosspartition/IndexBootstrapTest.java +++ b/paimon-core/src/test/java/org/apache/paimon/crosspartition/IndexBootstrapTest.java @@ -97,6 +97,11 @@ public void testBoostrap() throws Exception { .containsExactlyInAnyOrder( GenericRow.of(2, 1, 3), GenericRow.of(4, 2, 5), GenericRow.of(6, 3, 7)); result.clear(); + + // In ParallelExecution, latch.countDown first, then close the reader, it may not be closed + // here, (this is good, beneficial for query speed) but TableTestBase.after will check leak + // streams. So sleep here to avoid unstable. + Thread.sleep(1000); } @Test