You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2024/11/23 22:05:45 UTC

(pulsar) branch branch-3.0 updated: [fix][test][branch-3.0] Fix PrecisTopicPublishRateThrottleTest that broke after #23589 changes

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

lhotari pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 6693382ca10 [fix][test][branch-3.0] Fix PrecisTopicPublishRateThrottleTest that broke after #23589 changes
6693382ca10 is described below

commit 6693382ca10014b4722472e260f827663eb56111
Author: Lari Hotari <lh...@apache.org>
AuthorDate: Sun Nov 24 00:02:21 2024 +0200

    [fix][test][branch-3.0] Fix PrecisTopicPublishRateThrottleTest that broke after #23589 changes
    
    - commit aa4dbf3 broke this test
---
 .../broker/service/PrecisTopicPublishRateThrottleTest.java     | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PrecisTopicPublishRateThrottleTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PrecisTopicPublishRateThrottleTest.java
index b6f6bcb95ed..b3edf5e19dc 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PrecisTopicPublishRateThrottleTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/PrecisTopicPublishRateThrottleTest.java
@@ -35,6 +35,7 @@ import org.apache.pulsar.common.util.RateLimiter;
 import org.awaitility.Awaitility;
 import org.mockito.Mockito;
 import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
 import org.testng.annotations.Test;
 
 @Test(groups = "broker")
@@ -46,9 +47,10 @@ public class PrecisTopicPublishRateThrottleTest extends BrokerTestBase{
         //No-op
     }
 
+    @AfterMethod(alwaysRun = true)
     @Override
     protected void cleanup() throws Exception {
-        //No-op
+        super.internalCleanup();
     }
 
     @Test
@@ -85,7 +87,6 @@ public class PrecisTopicPublishRateThrottleTest extends BrokerTestBase{
             // No-op
         }
         Assert.assertNotNull(messageId);
-        super.internalCleanup();
     }
 
     @Test
@@ -114,7 +115,6 @@ public class PrecisTopicPublishRateThrottleTest extends BrokerTestBase{
         } catch (TimeoutException e) {
             // No-op
         }
-        super.internalCleanup();
     }
 
     @Test
@@ -166,7 +166,6 @@ public class PrecisTopicPublishRateThrottleTest extends BrokerTestBase{
             // No-op
         }
         Assert.assertNotNull(messageId);
-        super.internalCleanup();
     }
 
     @Test
@@ -205,7 +204,6 @@ public class PrecisTopicPublishRateThrottleTest extends BrokerTestBase{
         Assert.assertEquals(limiter.publishMaxMessageRate, rateInMsg);
 
         producer.close();
-        super.internalCleanup();
     }
 
     @Test
@@ -264,7 +262,5 @@ public class PrecisTopicPublishRateThrottleTest extends BrokerTestBase{
         blocking.set(false);
 
         sendFuture.join();
-
-        super.internalCleanup();
     }
 }