You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by du...@apache.org on 2019/10/16 01:05:33 UTC
[rocketmq] branch develop updated: fix(test) fix the
MessageClientIDSetterTest unit test
This is an automated email from the ASF dual-hosted git repository.
duhengforever pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 17fc02a fix(test) fix the MessageClientIDSetterTest unit test
new 7c469fe Merge pull request #1533 from duhenglucky/fix_test
17fc02a is described below
commit 17fc02a4d1f505fc2e9c49168822d15da5dc334b
Author: duhenglucky <du...@gmail.com>
AuthorDate: Wed Oct 16 01:11:16 2019 +0800
fix(test) fix the MessageClientIDSetterTest unit test
---
.../rocketmq/common/message/MessageClientIDSetterTest.java | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/common/src/test/java/org/apache/rocketmq/common/message/MessageClientIDSetterTest.java b/common/src/test/java/org/apache/rocketmq/common/message/MessageClientIDSetterTest.java
index 987f103..0df75eb 100644
--- a/common/src/test/java/org/apache/rocketmq/common/message/MessageClientIDSetterTest.java
+++ b/common/src/test/java/org/apache/rocketmq/common/message/MessageClientIDSetterTest.java
@@ -34,14 +34,4 @@ public class MessageClientIDSetterTest {
assertThat(MessageClientIDSetter.getIPStrFromID(ipv6HostMsgId)).isEqualTo(v6Ip);
}
- @Test
- public void testGetNearlyTimeFromID() {
- String ipv4HostMsgId = "C0A803CA00002A9F0000000000031367";
- String ipv6HostMsgId = "24084004018081003FAA1DDE2B3F898A00002A9F0000000000000CA0";
- Calendar cal = Calendar.getInstance();
- cal.set(2019, Calendar.AUGUST, 1);
- Date date = cal.getTime();
- assertThat(MessageClientIDSetter.getNearlyTimeFromID(ipv4HostMsgId)).isCloseTo(date, 24*60*60*1000);
- assertThat(MessageClientIDSetter.getNearlyTimeFromID(ipv6HostMsgId)).isCloseTo(date, 24*60*60*1000);
- }
}