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/07/09 03:19:35 UTC

[GitHub] [shardingsphere] terrymanu commented on a diff in pull request #18965: feat(integration-test): add resource query it test

terrymanu commented on code in PR #18965:
URL: https://github.com/apache/shardingsphere/pull/18965#discussion_r917213815


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/rql-integration-test-cases.xml:
##########
@@ -15,10 +15,17 @@
   ~ limitations under the License.
   -->
 <integration-test-cases>
-    <test-case sql="SHOW DATABASE RESOURCES" scenario-types="dbtbl_with_readwrite_splitting,readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
-        <assertion expected-data-file="show_resources.xml" />
+    <!--RESOURCE QUERY-->
+    <test-case sql="SHOW DATABASE RESOURCES" scenario-types="db,tbl,readwrite_splitting,encrypt,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
+        <assertion expected-data-file="show_resources.xml"/>
     </test-case>
-    
+
+    <!--FIXME! db scenario got a problem #18964-->
+    <test-case sql="SHOW DATABASE RESOURCES FROM {dbName}" scenario-types="tbl,readwrite_splitting,encrypt,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">

Review Comment:
   What is `{dbName}`, XML should be plain text, please do not add customized tag to increase understand cost.



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/rql-integration-test-cases.xml:
##########
@@ -15,10 +15,17 @@
   ~ limitations under the License.
   -->
 <integration-test-cases>
-    <test-case sql="SHOW DATABASE RESOURCES" scenario-types="dbtbl_with_readwrite_splitting,readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
-        <assertion expected-data-file="show_resources.xml" />
+    <!--RESOURCE QUERY-->
+    <test-case sql="SHOW DATABASE RESOURCES" scenario-types="db,tbl,readwrite_splitting,encrypt,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
+        <assertion expected-data-file="show_resources.xml"/>
     </test-case>
-    
+
+    <!--FIXME! db scenario got a problem #18964-->
+    <test-case sql="SHOW DATABASE RESOURCES FROM {dbName}" scenario-types="tbl,readwrite_splitting,encrypt,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
+        <assertion expected-data-file="show_resources.xml"/>
+    </test-case>
+
+    <!--RULES QUERY-->

Review Comment:
   What is the comment mean?



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/cases/assertion/IntegrationTestCase.java:
##########
@@ -35,6 +37,9 @@
 @XmlAccessorType(XmlAccessType.FIELD)
 public final class IntegrationTestCase {
     
+    private static final String DB_NAME = "\\{dbName}";

Review Comment:
   This is pojo for jaxb to convert XML only, could you move the business logic to other object?



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/rql-integration-test-cases.xml:
##########
@@ -15,10 +15,17 @@
   ~ limitations under the License.
   -->
 <integration-test-cases>
-    <test-case sql="SHOW DATABASE RESOURCES" scenario-types="dbtbl_with_readwrite_splitting,readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
-        <assertion expected-data-file="show_resources.xml" />
+    <!--RESOURCE QUERY-->

Review Comment:
   What is the comment mean?



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/resources/cases/rql/rql-integration-test-cases.xml:
##########
@@ -15,10 +15,17 @@
   ~ limitations under the License.
   -->
 <integration-test-cases>
-    <test-case sql="SHOW DATABASE RESOURCES" scenario-types="dbtbl_with_readwrite_splitting,readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
-        <assertion expected-data-file="show_resources.xml" />
+    <!--RESOURCE QUERY-->
+    <test-case sql="SHOW DATABASE RESOURCES" scenario-types="db,tbl,readwrite_splitting,encrypt,dbtbl_with_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt">
+        <assertion expected-data-file="show_resources.xml"/>
     </test-case>
-    
+
+    <!--FIXME! db scenario got a problem #18964-->

Review Comment:
   Is it correct for now? If yes, why add FIXME; if not, what the result when test run?



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