diff --git a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/rocketmq/producer/RocketMQProducerImplTest.java b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/rocketmq/producer/RocketMQProducerImplTest.java index 99b3b11e15..ae436527a3 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/rocketmq/producer/RocketMQProducerImplTest.java +++ b/eventmesh-connector-plugin/eventmesh-connector-rocketmq/src/test/java/org/apache/rocketmq/producer/RocketMQProducerImplTest.java @@ -17,17 +17,15 @@ package org.apache.rocketmq.producer; -import static org.junit.Assert.assertTrue; import io.openmessaging.api.exception.OMSRuntimeException; import org.apache.eventmesh.api.producer.MeshMQProducer; import org.apache.eventmesh.connector.rocketmq.producer.RocketMQProducerImpl; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; -@RunWith(MockitoJUnitRunner.class) + public class RocketMQProducerImplTest { private String topicName = "test-it"; @@ -46,10 +44,10 @@ public void testCreate_OK() { MeshMQProducer meshMQProducer = new RocketMQProducerImpl(); try { - meshMQProducer.createTopic(topicName); - assertTrue("Topic was created successfully", true); + meshMQProducer.createTopic(topicName); + Assert.assertTrue("Topic was created successfully", true); } catch (OMSRuntimeException e) { - assertTrue(e.getMessage(), false); + Assert.assertTrue(e.getMessage(), false); } } diff --git a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/producer/StandaloneMeshMQProducerAdaptor.java b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/producer/StandaloneMeshMQProducerAdaptor.java index fb632c7c5c..b6318ae28d 100644 --- a/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/producer/StandaloneMeshMQProducerAdaptor.java +++ b/eventmesh-connector-plugin/eventmesh-connector-standalone/src/main/java/org/apache/eventmesh/connector/standalone/producer/StandaloneMeshMQProducerAdaptor.java @@ -21,6 +21,8 @@ import io.openmessaging.api.MessageBuilder; import io.openmessaging.api.SendCallback; import io.openmessaging.api.SendResult; +import io.openmessaging.api.exception.OMSRuntimeException; + import org.apache.eventmesh.api.RRCallback; import org.apache.eventmesh.api.producer.MeshMQProducer; import org.apache.eventmesh.connector.standalone.MessagingAccessPointImpl; @@ -122,4 +124,10 @@ public void shutdown() { public MessageBuilder messageBuilder() { return null; } + + @Override + public void createTopic(String topicName) throws OMSRuntimeException { + // TODO Auto-generated method stub + + } }