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

tallison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git


The following commit(s) were added to refs/heads/main by this push:
     new 0f89e2b4e fix race condition in flaky tika-eval-app profiler test 
(#2472)
0f89e2b4e is described below

commit 0f89e2b4e905010f355c0865fbdfdd09bb70de67
Author: Tim Allison <[email protected]>
AuthorDate: Sun Dec 21 05:43:46 2025 -0500

    fix race condition in flaky tika-eval-app profiler test (#2472)
---
 .../java/org/apache/tika/eval/app/ProfilerBatchTest.java     | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git 
a/tika-eval/tika-eval-app/src/test/java/org/apache/tika/eval/app/ProfilerBatchTest.java
 
b/tika-eval/tika-eval-app/src/test/java/org/apache/tika/eval/app/ProfilerBatchTest.java
index a413e96c8..9697abaf6 100644
--- 
a/tika-eval/tika-eval-app/src/test/java/org/apache/tika/eval/app/ProfilerBatchTest.java
+++ 
b/tika-eval/tika-eval-app/src/test/java/org/apache/tika/eval/app/ProfilerBatchTest.java
@@ -31,6 +31,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
+import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
@@ -68,15 +69,16 @@ public class ProfilerBatchTest {
         ExtractProfileRunner.main(args);
     }
 
-    @AfterEach
-    public void tearDown() throws IOException {
+    @AfterAll
+    public static void tearDown() throws IOException {
         try {
-            CONN.close();
+            if (CONN != null) {
+                CONN.close();
+            }
         } catch (SQLException e) {
-            throw new RuntimeException(e);
+            // ignore
         }
         FileUtils.deleteDirectory(DB_DIR.toFile());
-
     }
 
     @BeforeEach

Reply via email to