You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2022/07/13 02:20:28 UTC
[pulsar] branch master updated: Replace assertTrue to assertEquals (#16518)
This is an automated email from the ASF dual-hosted git repository.
technoboy 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 80027563018 Replace assertTrue to assertEquals (#16518)
80027563018 is described below
commit 800275630187a3faf24d6ef9383c258c8fa26d61
Author: Kai Wang <kw...@streamnative.io>
AuthorDate: Wed Jul 13 10:20:21 2022 +0800
Replace assertTrue to assertEquals (#16518)
---
.../apache/pulsar/broker/intercept/BrokerInterceptorTest.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/intercept/BrokerInterceptorTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/intercept/BrokerInterceptorTest.java
index 51d0420f2dd..a26783cda65 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/intercept/BrokerInterceptorTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/intercept/BrokerInterceptorTest.java
@@ -133,25 +133,25 @@ public class BrokerInterceptorTest extends ProducerConsumerBase {
pulsarClient.newProducer(Schema.BOOL).topic("test").create();
pulsarClient.newConsumer(Schema.STRING).topic("test1").subscriptionName("test-sub").subscribe();
// single connection for both producer and consumer
- Assert.assertTrue(((CounterBrokerInterceptor)listener).getConnectionCreationCount() == 1);
+ assertEquals(((CounterBrokerInterceptor) listener).getConnectionCreationCount(), 1);
}
@Test
public void testProducerCreation() throws PulsarClientException {
BrokerInterceptor listener = pulsar.getBrokerInterceptor();
Assert.assertTrue(listener instanceof CounterBrokerInterceptor);
- Assert.assertTrue(((CounterBrokerInterceptor)listener).getProducerCount() == 0);
+ assertEquals(((CounterBrokerInterceptor) listener).getProducerCount(), 0);
pulsarClient.newProducer(Schema.BOOL).topic("test").create();
- Assert.assertTrue(((CounterBrokerInterceptor)listener).getProducerCount() == 1);
+ assertEquals(((CounterBrokerInterceptor) listener).getProducerCount(), 1);
}
@Test
public void testConsumerCreation() throws PulsarClientException {
BrokerInterceptor listener = pulsar.getBrokerInterceptor();
Assert.assertTrue(listener instanceof CounterBrokerInterceptor);
- Assert.assertTrue(((CounterBrokerInterceptor)listener).getConsumerCount() == 0);
+ assertEquals(((CounterBrokerInterceptor) listener).getConsumerCount(), 0);
pulsarClient.newConsumer(Schema.STRING).topic("test1").subscriptionName("test-sub").subscribe();
- Assert.assertTrue(((CounterBrokerInterceptor)listener).getConsumerCount() == 1);
+ assertEquals(((CounterBrokerInterceptor) listener).getConsumerCount(), 1);
}
@Test