rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] incubator-rocketmq git commit: ROCKETMQ-3 Clean up the unit test code of rocketmq-client
Date Fri, 23 Dec 2016 04:46:20 GMT
ROCKETMQ-3 Clean up the unit test code of rocketmq-client


Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/commit/63803056
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/tree/63803056
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/diff/63803056

Branch: refs/heads/master
Commit: 63803056ae37ad8a085d35a13fc4d52a8c54fcb3
Parents: 2aaf036
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Fri Dec 23 12:44:59 2016 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Fri Dec 23 12:45:44 2016 +0800

----------------------------------------------------------------------
 .../alibaba/rocketmq/client/ValidatorsTest.java   | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rocketmq/blob/63803056/rocketmq-client/src/test/java/com/alibaba/rocketmq/client/ValidatorsTest.java
----------------------------------------------------------------------
diff --git a/rocketmq-client/src/test/java/com/alibaba/rocketmq/client/ValidatorsTest.java
b/rocketmq-client/src/test/java/com/alibaba/rocketmq/client/ValidatorsTest.java
index 6dadafb..2a10ec4 100644
--- a/rocketmq-client/src/test/java/com/alibaba/rocketmq/client/ValidatorsTest.java
+++ b/rocketmq-client/src/test/java/com/alibaba/rocketmq/client/ValidatorsTest.java
@@ -17,6 +17,7 @@
 
 package com.alibaba.rocketmq.client;
 
+import com.alibaba.rocketmq.client.exception.MQClientException;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -24,16 +25,11 @@ import org.junit.Test;
 public class ValidatorsTest {
 
     @Test
-    public void topicValidatorTest() {
-        try {
-            Validators.checkTopic("Hello");
-            Validators.checkTopic("%RETRY%Hello");
-            Validators.checkTopic("_%RETRY%Hello");
-            Validators.checkTopic("-%RETRY%Hello");
-            Validators.checkTopic("223-%RETRY%Hello");
-        } catch (Exception e) {
-            e.printStackTrace();
-            Assert.assertTrue(false);
-        }
+    public void topicValidatorTest() throws MQClientException {
+        Validators.checkTopic("Hello");
+        Validators.checkTopic("%RETRY%Hello");
+        Validators.checkTopic("_%RETRY%Hello");
+        Validators.checkTopic("-%RETRY%Hello");
+        Validators.checkTopic("223-%RETRY%Hello");
     }
 }


Mime
View raw message