You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/06/25 09:49:03 UTC

[GitHub] [incubator-eventmesh] walterlife opened a new pull request, #966: [ISSUE #869] Add unit tests for EventMesh Runtime for Java

walterlife opened a new pull request, #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966

   Fixes ISSUE https://github.com/apache/incubator-eventmesh/issues/869.
   
   Motivation
   Add missing unit tests
   
   Modifications
   Add unit tests for eventmesh-runtime module.
   
   Documentation
   - [ ] Does this pull request introduce a new feature? (no)
   - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
   - If a feature is not applicable for documentation, explain why?
   - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife commented on a diff in pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
walterlife commented on code in PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966#discussion_r906750310


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/RemotingHelper.java:
##########
@@ -50,6 +50,9 @@ public static String exceptionSimpleDesc(final Throwable e) {
 
     public static SocketAddress string2SocketAddress(final String addr) {
         int split = addr.lastIndexOf(":");
+        if (split == -1) {

Review Comment:
   ok, already revert.



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a diff in pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on code in PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966#discussion_r906747382


##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/util/RemotingHelper.java:
##########
@@ -50,6 +50,9 @@ public static String exceptionSimpleDesc(final Throwable e) {
 
     public static SocketAddress string2SocketAddress(final String addr) {
         int split = addr.lastIndexOf(":");
+        if (split == -1) {

Review Comment:
   It's better to not do these kinds of changes in this PR, you just want to add UT right? Please revert the extra change.



##########
build.gradle:
##########
@@ -465,8 +465,8 @@ subprojects {
             dependency "com.github.stefanbirkner:system-rules:1.16.1"
             dependency "org.assertj:assertj-core:2.6.0"
 
-            dependency "org.mockito:mockito-core:2.23.0"
-            dependency "org.mockito:mockito-inline:3.6.28"
+            dependency "org.mockito:mockito-core:3.8.0"
+            dependency "org.mockito:mockito-inline:3.8.0"

Review Comment:
   Is there any reason we need to upgrade these version?



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife commented on pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
walterlife commented on PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966#issuecomment-1166263810

   > @walterlife you can add a new more specific issue for this change
   
   ok, add new issue: 917


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] codecov[bot] commented on pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966#issuecomment-1166414257

   # [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/966?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#966](https://codecov.io/gh/apache/incubator-eventmesh/pull/966?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f177267) into [master](https://codecov.io/gh/apache/incubator-eventmesh/commit/dab10863a82a1828ea2e44b164086a1427abd8a3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dab1086) will **increase** coverage by `1.20%`.
   > The diff coverage is `73.33%`.
   
   ```diff
   @@             Coverage Diff             @@
   ##             master    #966      +/-   ##
   ===========================================
   + Coverage      8.37%   9.58%   +1.20%     
   - Complexity      529     600      +71     
   ===========================================
     Files           362     362              
     Lines         23228   23215      -13     
     Branches       2546    2544       -2     
   ===========================================
   + Hits           1946    2225     +279     
   + Misses        21132   20790     -342     
   - Partials        150     200      +50     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-eventmesh/pull/966?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...g/apache/eventmesh/runtime/util/EventMeshUtil.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL3V0aWwvRXZlbnRNZXNoVXRpbC5qYXZh) | `58.82% <73.33%> (+56.61%)` | :arrow_up: |
   | [...pache/eventmesh/common/file/FileChangeContext.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9maWxlL0ZpbGVDaGFuZ2VDb250ZXh0LmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...rg/apache/eventmesh/common/file/WatchFileTask.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi9maWxlL1dhdGNoRmlsZVRhc2suamF2YQ==) | `28.07% <0.00%> (-29.83%)` | :arrow_down: |
   | [...ava/org/apache/eventmesh/common/utils/IPUtils.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZXZlbnRtZXNoL2NvbW1vbi91dGlscy9JUFV0aWxzLmphdmE=) | `34.25% <0.00%> (-5.56%)` | :arrow_down: |
   | [...sh/client/grpc/consumer/EventMeshGrpcConsumer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXNkay1qYXZhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY2xpZW50L2dycGMvY29uc3VtZXIvRXZlbnRNZXNoR3JwY0NvbnN1bWVyLmphdmE=) | `75.80% <0.00%> (-1.62%)` | :arrow_down: |
   | [...che/eventmesh/runtime/boot/AbstractHTTPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvQWJzdHJhY3RIVFRQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...che/eventmesh/runtime/boot/EventMeshTCPServer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2Jvb3QvRXZlbnRNZXNoVENQU2VydmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...sh/client/http/producer/EventMeshHttpProducer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXNkay1qYXZhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9ldmVudG1lc2gvY2xpZW50L2h0dHAvcHJvZHVjZXIvRXZlbnRNZXNoSHR0cFByb2R1Y2VyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...core/protocol/http/consumer/EventMeshConsumer.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvaHR0cC9jb25zdW1lci9FdmVudE1lc2hDb25zdW1lci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [.../protocol/tcp/client/group/ClientGroupWrapper.java](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXZlbnRtZXNoLXJ1bnRpbWUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2V2ZW50bWVzaC9ydW50aW1lL2NvcmUvcHJvdG9jb2wvdGNwL2NsaWVudC9ncm91cC9DbGllbnRHcm91cFdyYXBwZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | ... and [21 more](https://codecov.io/gh/apache/incubator-eventmesh/pull/966/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/966?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-eventmesh/pull/966?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dab1086...f177267](https://codecov.io/gh/apache/incubator-eventmesh/pull/966?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife commented on a diff in pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
walterlife commented on code in PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966#discussion_r906749928


##########
build.gradle:
##########
@@ -465,8 +465,8 @@ subprojects {
             dependency "com.github.stefanbirkner:system-rules:1.16.1"
             dependency "org.assertj:assertj-core:2.6.0"
 
-            dependency "org.mockito:mockito-core:2.23.0"
-            dependency "org.mockito:mockito-inline:3.6.28"
+            dependency "org.mockito:mockito-core:3.8.0"
+            dependency "org.mockito:mockito-inline:3.8.0"

Review Comment:
   In some unit-test scenarios, mock static methods are required, and this feature, mockito-inline, was introduced in higher versions, So upgrade the corresponding version.



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] xwm1992 merged pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
xwm1992 merged PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife closed pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
walterlife closed pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java
URL: https://github.com/apache/incubator-eventmesh/pull/966


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] ruanwenjun commented on a diff in pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on code in PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966#discussion_r906750941


##########
build.gradle:
##########
@@ -465,8 +465,8 @@ subprojects {
             dependency "com.github.stefanbirkner:system-rules:1.16.1"
             dependency "org.assertj:assertj-core:2.6.0"
 
-            dependency "org.mockito:mockito-core:2.23.0"
-            dependency "org.mockito:mockito-inline:3.6.28"
+            dependency "org.mockito:mockito-core:3.8.0"
+            dependency "org.mockito:mockito-inline:3.8.0"

Review Comment:
   Ok, if so, we can remove the powermock.



-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife commented on pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
walterlife commented on PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966#issuecomment-1166264001

   > @walterlife you can add a new more specific issue for this change
   
   @qqeasonchen ok, add new issue: 917


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife commented on pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
walterlife commented on PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966#issuecomment-1166263349

   > 
   
   ok, add 917, and already modify pr description


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] walterlife commented on pull request #966: [ISSUE #917] Add unit tests for EventMesh Runtime for Java

Posted by GitBox <gi...@apache.org>.
walterlife commented on PR #966:
URL: https://github.com/apache/incubator-eventmesh/pull/966#issuecomment-1166263931

   > @walterlife you can add a new more specific issue for this change
   
   


-- 
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: dev-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org