You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/12/13 20:09:05 UTC

[GitHub] [shardingsphere] Jacob953 opened a new pull request, #22863: Add test cases for agent-core advisors

Jacob953 opened a new pull request, #22863:
URL: https://github.com/apache/shardingsphere/pull/22863

   Signed-off-by: Junfeng <i...@jacob953.com>
   
   Fixes #22861.
   
   Changes proposed in this pull request:
     - Add test cases for agent-core advisors
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [x] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] Jacob953 commented on pull request #22863: Add test cases for agent-core advisors

Posted by GitBox <gi...@apache.org>.
Jacob953 commented on PR #22863:
URL: https://github.com/apache/shardingsphere/pull/22863#issuecomment-1350392471

   It was a mistake of mine. Thx for your code review @azexcy. )


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] azexcy commented on a diff in pull request #22863: Add test cases for agent-core advisors

Posted by GitBox <gi...@apache.org>.
azexcy commented on code in PR #22863:
URL: https://github.com/apache/shardingsphere/pull/22863#discussion_r1047926876


##########
agent/core/src/test/java/org/apache/shardingsphere/agent/core/advisor/ClassAdvisorRegistryFactoryTest.java:
##########
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.agent.core.advisor;
+
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ClassAdvisorRegistryFactoryTest {

Review Comment:
   Can we use `final` class? 



##########
agent/core/src/test/java/org/apache/shardingsphere/agent/core/advisor/ClassAdvisorRegistryTest.java:
##########
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.agent.core.advisor;
+
+import org.apache.shardingsphere.agent.advisor.ClassAdvisor;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+public class ClassAdvisorRegistryTest {

Review Comment:
   This is the same, add `final`



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] terrymanu merged pull request #22863: Add test cases for agent-core advisors

Posted by GitBox <gi...@apache.org>.
terrymanu merged PR #22863:
URL: https://github.com/apache/shardingsphere/pull/22863


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] codecov-commenter commented on pull request #22863: Add test cases for agent-core advisors

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #22863:
URL: https://github.com/apache/shardingsphere/pull/22863#issuecomment-1350413469

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/22863?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 [#22863](https://codecov.io/gh/apache/shardingsphere/pull/22863?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (de63470) into [master](https://codecov.io/gh/apache/shardingsphere/commit/5c7ee9a59ab00e4d8424787893d94e587ded80a6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5c7ee9a) will **increase** coverage by `0.02%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #22863      +/-   ##
   ============================================
   + Coverage     49.30%   49.33%   +0.02%     
     Complexity     2458     2458              
   ============================================
     Files          4141     4141              
     Lines         57846    57846              
     Branches       9917     9917              
   ============================================
   + Hits          28523    28536      +13     
   + Misses        26858    26845      -13     
     Partials       2465     2465              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/22863?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...shardingsphere/infra/util/retry/RetryExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/22863/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-aW5mcmEvdXRpbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvdXRpbC9yZXRyeS9SZXRyeUV4ZWN1dG9yLmphdmE=) | `92.85% <0.00%> (+92.85%)` | :arrow_up: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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: notifications-unsubscribe@shardingsphere.apache.org

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