You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Willhow-Gao (via GitHub)" <gi...@apache.org> on 2024/05/03 15:28:40 UTC

[PR] [ISSUE #8090]1.optimize isSetEqual method and add Unit tests; 2.fix a… [rocketmq]

Willhow-Gao opened a new pull request, #8091:
URL: https://github.com/apache/rocketmq/pull/8091

   Fixes #8090 
   1. 优化了DefaultLitePullConsumerImpl#isSetEqual方法,减少了循环次数和不正确的判断。并添加了isSetEqual方法的单元测试
   2. 订正了一个单词拼写错误
   
   How Did You Test This Change?
   添加了单元测试验证isSetEqual方法是否符合预期


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #8090] Optimize isSetEqual for DefaultLitePullConsumerImpl [rocketmq]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin merged PR #8091:
URL: https://github.com/apache/rocketmq/pull/8091


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #8090]1.optimize isSetEqual method and add Unit tests; 2.fix a… [rocketmq]

Posted by "Willhow-Gao (via GitHub)" <gi...@apache.org>.
Willhow-Gao commented on code in PR #8091:
URL: https://github.com/apache/rocketmq/pull/8091#discussion_r1590491448


##########
client/src/test/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImplTest.java:
##########
@@ -0,0 +1,85 @@
+package org.apache.rocketmq.client.impl.consumer;
+
+import org.apache.rocketmq.client.consumer.DefaultLitePullConsumer;
+import org.apache.rocketmq.common.message.MessageQueue;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Willhow
+ * @since 2024/5/3
+ */

Review Comment:
   already removed.Idea generated it automatically, so I didn’t notice it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #8090]1.optimize isSetEqual method and add Unit tests; 2.fix a… [rocketmq]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8091:
URL: https://github.com/apache/rocketmq/pull/8091#issuecomment-2097288402

   ## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/8091?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `33.33333%` with `4 lines` in your changes are missing coverage. Please review.
   > Project coverage is 42.84%. Comparing base [(`b39f65e`)](https://app.codecov.io/gh/apache/rocketmq/commit/b39f65ec08b9a0a72f9fdd5b826f2b1c88c9c496?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`d656b4c`)](https://app.codecov.io/gh/apache/rocketmq/pull/8091?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 12 commits behind head on develop.
   
   | [Files](https://app.codecov.io/gh/apache/rocketmq/pull/8091?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...ent/impl/consumer/DefaultLitePullConsumerImpl.java](https://app.codecov.io/gh/apache/rocketmq/pull/8091?src=pr&el=tree&filepath=client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fclient%2Fimpl%2Fconsumer%2FDefaultLitePullConsumerImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9jb25zdW1lci9EZWZhdWx0TGl0ZVB1bGxDb25zdW1lckltcGwuamF2YQ==) | 40.00% | [1 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8091?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...a/org/apache/rocketmq/client/impl/MQAdminImpl.java](https://app.codecov.io/gh/apache/rocketmq/pull/8091?src=pr&el=tree&filepath=client%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Frocketmq%2Fclient%2Fimpl%2FMQAdminImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y2xpZW50L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9yb2NrZXRtcS9jbGllbnQvaW1wbC9NUUFkbWluSW1wbC5qYXZh) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/rocketmq/pull/8091?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             develop    #8091      +/-   ##
   =============================================
   - Coverage      42.88%   42.84%   -0.05%     
   - Complexity     10348    10350       +2     
   =============================================
     Files           1270     1270              
     Lines          88673    88680       +7     
     Branches       11398    11397       -1     
   =============================================
   - Hits           38029    37994      -35     
   - Misses         45950    45989      +39     
   - Partials        4694     4697       +3     
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/rocketmq/pull/8091?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #8090]1.optimize isSetEqual method and add Unit tests; 2.fix a… [rocketmq]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin commented on code in PR #8091:
URL: https://github.com/apache/rocketmq/pull/8091#discussion_r1590483117


##########
client/src/test/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImplTest.java:
##########
@@ -0,0 +1,85 @@
+package org.apache.rocketmq.client.impl.consumer;
+
+import org.apache.rocketmq.client.consumer.DefaultLitePullConsumer;
+import org.apache.rocketmq.common.message.MessageQueue;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Willhow
+ * @since 2024/5/3
+ */

Review Comment:
   Author information needs to be removed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #8090]1.optimize isSetEqual method and add Unit tests; 2.fix a… [rocketmq]

Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin commented on PR #8091:
URL: https://github.com/apache/rocketmq/pull/8091#issuecomment-2095093396

   Error:  /home/runner/work/rocketmq/rocketmq/client/src/test/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImplTest.java:1: Line does not match expected header line of '/\*'. [RegexpHeader]
   Error:  /home/runner/work/rocketmq/rocketmq/client/src/test/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImplTest.java:15: Recommended remove @author tag in javadoc! [RegexpSingleline]
   Error:  /home/runner/work/rocketmq/rocketmq/client/src/test/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImplTest.java:60:91: '{' is not preceded with whitespace. [WhitespaceAround]
   Error:  /home/runner/work/rocketmq/rocketmq/client/src/test/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImplTest.java:68:91: '{' is not preceded with whitespace. [WhitespaceAround]
   Error:  /home/runner/work/rocketmq/rocketmq/client/src/test/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImplTest.java:76:91: '{' is not preceded with whitespace. [WhitespaceAround]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #8090]1.optimize isSetEqual method and add Unit tests; 2.fix a… [rocketmq]

Posted by "Willhow-Gao (via GitHub)" <gi...@apache.org>.
Willhow-Gao commented on code in PR #8091:
URL: https://github.com/apache/rocketmq/pull/8091#discussion_r1591234961


##########
client/src/test/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImplTest.java:
##########
@@ -0,0 +1,85 @@
+package org.apache.rocketmq.client.impl.consumer;
+
+import org.apache.rocketmq.client.consumer.DefaultLitePullConsumer;
+import org.apache.rocketmq.common.message.MessageQueue;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Willhow
+ * @since 2024/5/3
+ */

Review Comment:
   > 作者信息需要删除
   
   already removed. Also revised code style and added license comments



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #8090]1.optimize isSetEqual method and add Unit tests; 2.fix a… [rocketmq]

Posted by "Willhow-Gao (via GitHub)" <gi...@apache.org>.
Willhow-Gao commented on code in PR #8091:
URL: https://github.com/apache/rocketmq/pull/8091#discussion_r1590491448


##########
client/src/test/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImplTest.java:
##########
@@ -0,0 +1,85 @@
+package org.apache.rocketmq.client.impl.consumer;
+
+import org.apache.rocketmq.client.consumer.DefaultLitePullConsumer;
+import org.apache.rocketmq.common.message.MessageQueue;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Willhow
+ * @since 2024/5/3
+ */

Review Comment:
   already removed.Idea generated it automatically, so I didn’t notice it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #8090]1.optimize isSetEqual method and add Unit tests; 2.fix a… [rocketmq]

Posted by "Willhow-Gao (via GitHub)" <gi...@apache.org>.
Willhow-Gao commented on PR #8091:
URL: https://github.com/apache/rocketmq/pull/8091#issuecomment-2097679990

   > 合并一下 develop 重新提交一下,develop 有一些单测的修复
   
   merge develop了


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [ISSUE #8090]1.optimize isSetEqual method and add Unit tests; 2.fix a… [rocketmq]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on PR #8091:
URL: https://github.com/apache/rocketmq/pull/8091#issuecomment-2097669930

   合并一下 develop 重新提交一下,develop 有一些单测的修复


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org