This is an automated email from the ASF dual-hosted git repository. lhotari pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push: new 3ebf91723e9 [fix][test] Fix resource leaks in PulsarBrokerStarterTest (#24235) 3ebf91723e9 is described below commit 3ebf91723e9b35410639c0fbb6643f66a919a4a7 Author: Lari Hotari <lhot...@users.noreply.github.com> AuthorDate: Fri May 2 14:56:59 2025 +0300 [fix][test] Fix resource leaks in PulsarBrokerStarterTest (#24235) --- .../src/test/java/org/apache/pulsar/PulsarBrokerStarterTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/PulsarBrokerStarterTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/PulsarBrokerStarterTest.java index 4c05a991b7f..7501d558509 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/PulsarBrokerStarterTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/PulsarBrokerStarterTest.java @@ -283,6 +283,7 @@ public class PulsarBrokerStarterTest { */ @Test public void testMainWithNoArgument() throws Exception { + @Cleanup("shutdown") BrokerStarter brokerStarter = new BrokerStarter(); @Cleanup StringWriter err = new StringWriter(); @@ -301,6 +302,7 @@ public class PulsarBrokerStarterTest { public void testMainRunBookieAndAutoRecoveryNoConfig() throws Exception { File testConfigFile = createValidBrokerConfigFile(); String[] args = {"-c", testConfigFile.getAbsolutePath(), "-rb", "-ra", "-bc", ""}; + @Cleanup("shutdown") BrokerStarter starter = new BrokerStarter(); @Cleanup StringWriter err = new StringWriter(); @@ -319,6 +321,7 @@ public class PulsarBrokerStarterTest { public void testMainRunBookieRecoveryNoConfig() throws Exception { File testConfigFile = createValidBrokerConfigFile(); String[] args = {"-c", testConfigFile.getAbsolutePath(), "-ra", "-bc", ""}; + @Cleanup("shutdown") BrokerStarter starter = new BrokerStarter(); @Cleanup StringWriter err = new StringWriter(); @@ -336,6 +339,7 @@ public class PulsarBrokerStarterTest { public void testMainRunBookieNoConfig() throws Exception { File testConfigFile = createValidBrokerConfigFile(); String[] args = {"-c", testConfigFile.getAbsolutePath(), "-rb", "-bc", ""}; + @Cleanup("shutdown") BrokerStarter starter = new BrokerStarter(); @Cleanup StringWriter err = new StringWriter(); @@ -353,6 +357,7 @@ public class PulsarBrokerStarterTest { public void testMainEnableRunBookieThroughBrokerConfig() throws Exception { File testConfigFile = createValidBrokerConfigFile(); String[] args = {"-c", testConfigFile.getAbsolutePath()}; + @Cleanup("shutdown") BrokerStarter starter = new BrokerStarter(); @Cleanup StringWriter err = new StringWriter();