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/11/17 11:13:03 UTC

[GitHub] [shardingsphere] boyjoy1127 opened a new pull request, #22241: Refactor optimization unit test. Describe the case in xml file,…

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

   Refactor optimization unit test. Describe the case in xml file, and use junit parameterized method to test.
   
   Ref #19937 .
   
   Changes proposed in this pull request:
     - Refactor optimization unit test. Describe the case in xml file, and use junit parameterized method to test.
   
   ---
   
   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.
   - [X] 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`.
   - [X] I have made corresponding changes to the documentation.
   - [X] 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] strongduanmu merged pull request #22241: Refactor optimization unit test. Describe the case in xml file,…

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


-- 
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] strongduanmu commented on a diff in pull request #22241: Refactor optimization unit test. Describe the case in xml file,…

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


##########
kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/common/TestCaseAssertion.java:
##########
@@ -0,0 +1,37 @@
+/*
+ * 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.sqlfederation.optimizer.common;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * JAXB definition of test case assertion.
+ */
+@Getter
+@Setter
+@XmlAccessorType(XmlAccessType.FIELD)
+public class TestCaseAssertion {

Review Comment:
   Please add final for TestCaseAssertion.



-- 
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 #22241: Refactor optimization unit test. Describe the case in xml file,…

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

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/22241?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 [#22241](https://codecov.io/gh/apache/shardingsphere/pull/22241?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (66fbc74) into [master](https://codecov.io/gh/apache/shardingsphere/commit/d85f4f2135755c0666ff5ee282dd0ab552744d79?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d85f4f2) will **decrease** coverage by `1.61%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #22241      +/-   ##
   ============================================
   - Coverage     60.98%   59.37%   -1.62%     
   + Complexity     2544     2269     -275     
   ============================================
     Files          4119     4163      +44     
     Lines         57322    57686     +364     
     Branches       9705     9787      +82     
   ============================================
   - Hits          34960    34249     -711     
   - Misses        19412    20588    +1176     
   + Partials       2950     2849     -101     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/22241?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...tion/MismatchedProtocolAndDataSourceException.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-aW5mcmEvY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9leGNlcHRpb24vTWlzbWF0Y2hlZFByb3RvY29sQW5kRGF0YVNvdXJjZUV4Y2VwdGlvbi5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ernal/asserts/segment/database/DatabaseAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3NlZ21lbnQvZGF0YWJhc2UvRGF0YWJhc2VBc3NlcnQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ernal/asserts/segment/distsql/AlgorithmAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3NlZ21lbnQvZGlzdHNxbC9BbGdvcml0aG1Bc3NlcnQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...rts/segment/distsql/rdl/ShardingAuditorAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3NlZ21lbnQvZGlzdHNxbC9yZGwvU2hhcmRpbmdBdWRpdG9yQXNzZXJ0LmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ement/distsql/ral/impl/HintRALStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3N0YXRlbWVudC9kaXN0c3FsL3JhbC9pbXBsL0hpbnRSQUxTdGF0ZW1lbnRBc3NlcnQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ment/distsql/rdl/drop/DropRuleStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3N0YXRlbWVudC9kaXN0c3FsL3JkbC9kcm9wL0Ryb3BSdWxlU3RhdGVtZW50QXNzZXJ0LmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ent/distsql/rql/impl/ShowRulesStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3N0YXRlbWVudC9kaXN0c3FsL3JxbC9pbXBsL1Nob3dSdWxlc1N0YXRlbWVudEFzc2VydC5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [.../distsql/ral/impl/UpdatableRALStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3N0YXRlbWVudC9kaXN0c3FsL3JhbC9pbXBsL1VwZGF0YWJsZVJBTFN0YXRlbWVudEFzc2VydC5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ropShardingTableReferenceRulesStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3N0YXRlbWVudC9kaXN0c3FsL3JkbC9kcm9wL2ltcGwvRHJvcFNoYXJkaW5nVGFibGVSZWZlcmVuY2VSdWxlc1N0YXRlbWVudEFzc2VydC5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [.../distsql/ral/impl/QueryableRALStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22241/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3N0YXRlbWVudC9kaXN0c3FsL3JhbC9pbXBsL1F1ZXJ5YWJsZVJBTFN0YXRlbWVudEFzc2VydC5qYXZh) | `0.00% <0.00%> (-96.56%)` | :arrow_down: |
   | ... and [1470 more](https://codecov.io/gh/apache/shardingsphere/pull/22241/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) | |
   
   :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


[GitHub] [shardingsphere] boyjoy1127 commented on pull request #22241: Refactor optimization unit test. Describe the case in xml file,…

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

   > Hi @boyjoy1127, thank you for your contribution. Can you fix ci error first?
   
   Hi, I've fix the bug. @strongduanmu 


-- 
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] boyjoy1127 commented on a diff in pull request #22241: Refactor optimization unit test. Describe the case in xml file,…

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


##########
kernel/sql-federation/optimizer/src/test/java/org/apache/shardingsphere/sqlfederation/optimizer/common/TestCaseAssertion.java:
##########
@@ -0,0 +1,37 @@
+/*
+ * 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.sqlfederation.optimizer.common;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * JAXB definition of test case assertion.
+ */
+@Getter
+@Setter
+@XmlAccessorType(XmlAccessType.FIELD)
+public class TestCaseAssertion {

Review Comment:
   I've fixed the this.



-- 
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