Skip to content

Commit

Permalink
fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhao244 committed Nov 27, 2021
1 parent 77c116d commit 6e1f934
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@


public class RocketMQProducerImplTest {

private String topicName = "test-it";

@Before
public void before() {}
Expand All @@ -41,13 +39,20 @@ public void after() {

@Test
public void testCreate_OK() {

MeshMQProducer meshMQProducer = new RocketMQProducerImpl();
MeshMQProducer meshMQProducer = new RocketMQProducerImpl();
try {
meshMQProducer.createTopic(topicName);
Assert.assertTrue("Topic was created successfully", true);
meshMQProducer.createTopic("");
Assert.assertTrue("Failed to detect empty topic", false);
} catch (OMSRuntimeException e) {
Assert.assertTrue(e.getMessage(), false);
Assert.assertTrue("Successfully detected empty topic", true);
}

try {
meshMQProducer.createTopic(null);
Assert.assertTrue("Failed to detect null topic", false);
} catch (OMSRuntimeException e) {
Assert.assertTrue("Successfully detected null topic", true);
}

}
Expand Down

0 comments on commit 6e1f934

Please sign in to comment.