Skip to content

Commit

Permalink
fix build and add createtopic method to standalone module
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhao244 committed Sep 22, 2021
1 parent 5e23a7a commit 39d4e80
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -122,4 +124,10 @@ public void shutdown() {
public <T> MessageBuilder<T> messageBuilder() {
return null;
}

@Override
public void createTopic(String topicName) throws OMSRuntimeException {
// TODO Auto-generated method stub

}
}

0 comments on commit 39d4e80

Please sign in to comment.