This is an automated email from the ASF dual-hosted git repository.
xiangying pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new d8a6d9898ee [fix][build] Delete unused imported introduced by #21947
d8a6d9898ee is described below
commit d8a6d9898ee1636380a14318af03bf93ec566322
Author: xymeng <[email protected]>
AuthorDate: Tue Feb 6 15:54:10 2024 +0800
[fix][build] Delete unused imported introduced by #21947
---
.../java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java
index a6240775321..f4101dfdaa3 100644
---
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java
+++
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorTest.java
@@ -34,10 +34,10 @@ import org.apache.pulsar.client.api.Producer;
import org.apache.pulsar.client.api.Schema;
import org.apache.pulsar.client.impl.ProducerImpl;
import org.apache.pulsar.common.policies.data.TopicStats;
+import org.apache.pulsar.common.util.FutureUtil;
import org.junit.Assert;
import org.awaitility.Awaitility;
import org.mockito.Mockito;
-import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -143,7 +143,7 @@ public class OneWayReplicatorTest extends
OneWayReplicatorTestBase {
(PersistentReplicator)
persistentTopic.getReplicators().values().iterator().next();
// Mock an error when calling "replicator.disconnect()"
ProducerImpl mockProducer = Mockito.mock(ProducerImpl.class);
-
Mockito.when(mockProducer.closeAsync()).thenReturn(CompletableFuture.failedFuture(new
Exception("mocked ex")));
+
Mockito.when(mockProducer.closeAsync()).thenReturn(FutureUtil.failedFuture(new
Exception("mocked ex")));
ProducerImpl originalProducer =
overrideProducerForReplicator(replicator, mockProducer);
// Verify: since the "replicator.producer.closeAsync()" will retry
after it failed, the topic unload should be
// successful.