You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by da...@apache.org on 2023/12/22 13:55:48 UTC

(kafka) branch 3.7 updated: MINOR: Close RemoteLogManager in RemoteLogManagerTest (#15063)

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

dajac pushed a commit to branch 3.7
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/3.7 by this push:
     new c57f13fc5ce MINOR: Close RemoteLogManager in RemoteLogManagerTest (#15063)
c57f13fc5ce is described below

commit c57f13fc5ceaa3ad076b8e420f7af9207a67d1bc
Author: David Jacot <dj...@confluent.io>
AuthorDate: Fri Dec 22 14:54:48 2023 +0100

    MINOR: Close RemoteLogManager in RemoteLogManagerTest (#15063)
    
    This patch ensures that the RemoteLogManager is closed in RemoteLogManagerTest.
    
    Reviewers: Divij Vaidya <di...@amazon.com>, Lucas Brutschy <lb...@confluent.io>
---
 core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java b/core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java
index 3cac5fb36ae..9654e2b301a 100644
--- a/core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java
+++ b/core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java
@@ -73,6 +73,7 @@ import org.apache.kafka.storage.internals.log.RemoteStorageFetchInfo;
 import org.apache.kafka.storage.internals.log.TimeIndex;
 import org.apache.kafka.storage.internals.log.TransactionIndex;
 import org.apache.kafka.test.TestUtils;
+import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -227,6 +228,14 @@ public class RemoteLogManagerTest {
         };
     }
 
+    @AfterEach
+    void tearDown() {
+        if (remoteLogManager != null) {
+            remoteLogManager.close();
+            remoteLogManager = null;
+        }
+    }
+
     @Test
     void testGetLeaderEpochCheckpoint() {
         checkpoint.write(totalEpochEntries);