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/01/13 05:49:54 UTC

[GitHub] [shardingsphere] Swastyy opened a new pull request #14730: learning to make test cases

Swastyy opened a new pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730


   Fixes #ISSUSE_ID.
   
   Changes proposed in this pull request:
   -
   -
   -
   


-- 
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] Swastyy commented on a change in pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on a change in pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#discussion_r795315718



##########
File path: shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/refresher/type/CreateTableStatementSchemaRefresherTest.java
##########
@@ -0,0 +1,92 @@
+/*
+ * 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.infra.context.refresher.type;
+
+import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
+import org.apache.shardingsphere.infra.context.refresher.MetaDataRefresher;
+import org.apache.shardingsphere.infra.federation.optimizer.context.planner.OptimizerPlannerContext;
+import org.apache.shardingsphere.infra.federation.optimizer.metadata.FederationSchemaMetaData;
+import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableNameSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleCreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sql92.ddl.SQL92CreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sqlserver.ddl.SQLServerCreateTableStatement;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.Map;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public final class CreateTableStatementSchemaRefresherTest {
+    
+    @Test
+    public void refreshForMySQL() throws SQLException {
+        MySQLCreateTableStatement createTableStatement = new MySQLCreateTableStatement();
+        createTableStatement.setContainsNotExistClause(false);
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForOracle() throws SQLException {
+        OracleCreateTableStatement createTableStatement = new OracleCreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForPostgreSQL() throws SQLException {
+        PostgreSQLCreateTableStatement createTableStatement = new PostgreSQLCreateTableStatement();
+        createTableStatement.setContainsNotExistClause(false);
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForSQL92() throws SQLException {
+        SQL92CreateTableStatement createTableStatement = new SQL92CreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForSQLServer() throws SQLException {
+        SQLServerCreateTableStatement createTableStatement = new SQLServerCreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    private void refresh(final ShardingSphereMetaData schemaMetaData, final FederationSchemaMetaData schema, final Map<String, OptimizerPlannerContext> optimizerPlanners, 
+                         final Collection<String> logicDataSourceNames, final CreateTableStatement sqlStatement, final ConfigurationProperties props) throws SQLException {
+        sqlStatement.setTable(new SimpleTableSegment(new TableNameSegment(1, 3, new IdentifierValue("t_order_0"))));
+        DataSource dataSource = mock(DataSource.class, RETURNS_DEEP_STUBS);
+        when(dataSource.getConnection().getMetaData().getTables(any(), any(), any(), any())).thenReturn(mock(ResultSet.class));
+        //ShardingSphereSchema schema = ShardingSphereSchemaBuildUtil.buildSchema();
+        //ShardingSphereMetaData metaData = new ShardingSphereMetaData("", mock(ShardingSphereResource.class), mock(ShardingSphereRuleMetaData.class), schema);

Review comment:
       Ok




-- 
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] RaigorJiang commented on pull request #14730: Add test case for #14083

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1084621763


   Hi @Swastyy 
   CI fails, it looks like the referenced class has changed.
   Refer to `CreateTableStatementSchemaRefresher#refresh`, please change `FederationSchemaMetaData` to `FederationDatabaseMetaData`.


-- 
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] Swastyy commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1033463147


   Thank you @RaigorJiang , I will do 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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] Swastyy commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1046258126


   Hi @RaigorJiang , why one of the CI is getting cancelled now? There are 2 warnings shown when I click details they are:
   Warning:  Could not transfer metadata org.springframework:spring-test:4.3.6.BUILD-SNAPSHOT/maven-metadata.xml from/to apache.snapshots (https://repository.apache.org/snapshots): transfer failed for https://repository.apache.org/snapshots/org/springframework/spring-test/4.3.6.BUILD-SNAPSHOT/maven-metadata.xml
   Warning:  org.springframework:spring-test:4.3.6.BUILD-SNAPSHOT/maven-metadata.xmlfailed to transfer from https://repository.apache.org/snapshots during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of apache.snapshots has elapsed or updates are forced. Original error: Could not transfer metadata org.springframework:spring-test:4.3.6.BUILD-SNAPSHOT/maven-metadata.xml from/to apache.snapshots (https://repository.apache.org/snapshots): transfer failed for https://repository.apache.org/snapshots/org/springframework/spring-test/4.3.6.BUILD-SNAPSHOT/maven-metadata.xml


-- 
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 #14730: learning to make test cases

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/14730?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 [#14730](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (81ed74f) into [master](https://codecov.io/gh/apache/shardingsphere/commit/262285d42d0ab51b85243fde3e891721b7780f56?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (262285d) will **increase** coverage by `0.84%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/14730/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #14730      +/-   ##
   ============================================
   + Coverage     59.64%   60.48%   +0.84%     
   - Complexity     1896     1958      +62     
   ============================================
     Files          3147     3223      +76     
     Lines         46986    48483    +1497     
     Branches       7975     8279     +304     
   ============================================
   + Hits          28024    29325    +1301     
   - Misses        16735    16760      +25     
   - Partials       2227     2398     +171     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...query/extended/sync/PostgreSQLComSyncExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQvc2hhcmRpbmdzcGhlcmUtcHJveHktZnJvbnRlbmQtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvZnJvbnRlbmQvcG9zdGdyZXNxbC9jb21tYW5kL3F1ZXJ5L2V4dGVuZGVkL3N5bmMvUG9zdGdyZVNRTENvbVN5bmNFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | [...ealtered/YamlOnRuleAlteredActionConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS95YW1sL2NvbmZpZy9wb2pvL3J1bGVhbHRlcmVkL1lhbWxPblJ1bGVBbHRlcmVkQWN0aW9uQ29uZmlndXJhdGlvbi5qYXZh) | `11.11% <0.00%> (-88.89%)` | :arrow_down: |
   | [...e/data/pipeline/mysql/MySQLEnvironmentChecker.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1kaWFsZWN0L3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUtbXlzcWwvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RhdGEvcGlwZWxpbmUvbXlzcWwvTXlTUUxFbnZpcm9ubWVudENoZWNrZXIuamF2YQ==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [...ipeline/opengauss/OpenGaussEnvironmentChecker.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1kaWFsZWN0L3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUtb3BlbmdhdXNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYXRhL3BpcGVsaW5lL29wZW5nYXVzcy9PcGVuR2F1c3NFbnZpcm9ubWVudENoZWNrZXIuamF2YQ==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [...eline/postgresql/PostgreSQLEnvironmentChecker.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1kaWFsZWN0L3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUtcG9zdGdyZXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGF0YS9waXBlbGluZS9wb3N0Z3Jlc3FsL1Bvc3RncmVTUUxFbnZpcm9ubWVudENoZWNrZXIuamF2YQ==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
   | [.../mode/metadata/persist/MetaDataPersistService.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL21vZGUvbWV0YWRhdGEvcGVyc2lzdC9NZXRhRGF0YVBlcnNpc3RTZXJ2aWNlLmphdmE=) | `52.08% <0.00%> (-47.92%)` | :arrow_down: |
   | [...gsphere/infra/metadata/ShardingSphereMetaData.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9TaGFyZGluZ1NwaGVyZU1ldGFEYXRhLmphdmE=) | `7.14% <0.00%> (-42.86%)` | :arrow_down: |
   | [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L0hpbnRTb3VyY2VUeXBlLmphdmE=) | `0.00% <0.00%> (-42.86%)` | :arrow_down: |
   | [...sharding/cosid/CosIdIntervalShardingAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvYWxnb3JpdGhtL3NoYXJkaW5nL2Nvc2lkL0Nvc0lkSW50ZXJ2YWxTaGFyZGluZ0FsZ29yaXRobS5qYXZh) | `60.00% <0.00%> (-27.50%)` | :arrow_down: |
   | [...shardingsphere/mode/metadata/MetaDataContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL21vZGUvbWV0YWRhdGEvTWV0YURhdGFDb250ZXh0cy5qYXZh) | `45.45% <0.00%> (-22.97%)` | :arrow_down: |
   | ... and [515 more](https://codecov.io/gh/apache/shardingsphere/pull/14730/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/shardingsphere/pull/14730?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/shardingsphere/pull/14730?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 [262285d...81ed74f](https://codecov.io/gh/apache/shardingsphere/pull/14730?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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] RaigorJiang commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1033361138


   > No, I have not added it. In that case can you please help what things should I change in the code?
   
   OK, I'll check it later.


-- 
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] RaigorJiang commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1033445337


   Hi @Swastyy 
   I copied your test case and found the following problems:
   1. Methods declared by `@Test` should not have parameters
   2. The method `containsTable` belongs to `ShardingSphereSchema` (but not `ShardingSphereMetaData`) and can be called by `schemaMetaData.getSchema().containsTable(tableName)`
   3. The process of refreshing table metadata needs to read table information from the database, so we have to mock this method: `TableMetaDataBuilder.load`
   
   Here is a working example, you can improve the test logic as you want:
   ```java
   mport org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
   import org.apache.shardingsphere.infra.context.refresher.MetaDataRefresher;
   import org.apache.shardingsphere.infra.federation.optimizer.metadata.FederationSchemaMetaData;
   import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
   import org.apache.shardingsphere.infra.metadata.schema.ShardingSphereSchema;
   import org.apache.shardingsphere.infra.metadata.schema.builder.TableMetaDataBuilder;
   import org.apache.shardingsphere.infra.metadata.schema.model.TableMetaData;
   import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
   import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableNameSegment;
   import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateTableStatement;
   import org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue;
   import org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.ddl.MySQLCreateTableStatement;
   import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleCreateTableStatement;
   import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateTableStatement;
   import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sql92.ddl.SQL92CreateTableStatement;
   import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sqlserver.ddl.SQLServerCreateTableStatement;
   import org.junit.Test;
   import org.mockito.MockedStatic;
   
   import java.sql.SQLException;
   import java.util.Collections;
   import java.util.HashMap;
   import java.util.LinkedHashMap;
   import java.util.Map;
   
   import static org.junit.Assert.assertTrue;
   import static org.mockito.ArgumentMatchers.any;
   import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
   import static org.mockito.Mockito.mock;
   import static org.mockito.Mockito.mockStatic;
   import static org.mockito.Mockito.when;
   
   public final class CreateTableStatementSchemaRefresherTest {
       
       @Test
       public void refreshForMySQL() throws SQLException {
           MySQLCreateTableStatement createTableStatement = new MySQLCreateTableStatement();
           createTableStatement.setContainsNotExistClause(false);
           refresh(createTableStatement);
       }
       
       @Test
       public void refreshForOracle() throws SQLException {
           OracleCreateTableStatement createTableStatement = new OracleCreateTableStatement();
           refresh(createTableStatement);
       }
       
       @Test
       public void refreshForPostgreSQL() throws SQLException {
           PostgreSQLCreateTableStatement createTableStatement = new PostgreSQLCreateTableStatement();
           createTableStatement.setContainsNotExistClause(false);
           refresh(createTableStatement);
       }
       
       @Test
       public void refreshForSQL92() throws SQLException {
           SQL92CreateTableStatement createTableStatement = new SQL92CreateTableStatement();
           refresh(createTableStatement);
       }
       
       @Test
       public void refreshForSQLServer() throws SQLException {
           SQLServerCreateTableStatement createTableStatement = new SQLServerCreateTableStatement();
           refresh(createTableStatement);
       }
       
       private void refresh(final CreateTableStatement sqlStatement) throws SQLException {
           String tableName = "t_order_0";
           String schemaName = "sharding_db";
           sqlStatement.setTable(new SimpleTableSegment(new TableNameSegment(1, 3, new IdentifierValue(tableName))));
           ShardingSphereMetaData schemaMetaData = mock(ShardingSphereMetaData.class, RETURNS_DEEP_STUBS);
           ShardingSphereSchema shardingSphereSchema = new ShardingSphereSchema(getTableMetaDataMap(tableName));
           when(schemaMetaData.getSchema()).thenReturn(shardingSphereSchema);
           FederationSchemaMetaData federationSchemaMetaData = mock(FederationSchemaMetaData.class);
           when(federationSchemaMetaData.getName()).thenReturn(schemaName);
           MetaDataRefresher<CreateTableStatement> schemaRefresher = new CreateTableStatementSchemaRefresher();
           try(MockedStatic<TableMetaDataBuilder> tableMetaDataBuilder = mockStatic(TableMetaDataBuilder.class)) {
               tableMetaDataBuilder.when(() -> TableMetaDataBuilder.load(any(), any())).thenReturn(getTableMetaDataMap(tableName));
               schemaRefresher.refresh(schemaMetaData, federationSchemaMetaData, new HashMap<>(), Collections.emptyList(), sqlStatement, mock(ConfigurationProperties.class));
               assertTrue(shardingSphereSchema.containsTable(tableName));
           }
       }
       
       private Map<String, TableMetaData> getTableMetaDataMap(final String tableName) {
           Map<String, TableMetaData> result = new LinkedHashMap<>();
           result.put(tableName, mock(TableMetaData.class));
           return result;
       }
   }
   ```


-- 
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 edited a comment on pull request #14730: Add test case for #14083

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1046210776


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/14730?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 [#14730](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e795ea3) into [master](https://codecov.io/gh/apache/shardingsphere/commit/aee939b61d440d647ecc236e5bada9274201f9b7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (aee939b) will **increase** coverage by `0.03%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/14730/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #14730      +/-   ##
   ============================================
   + Coverage     60.43%   60.46%   +0.03%     
     Complexity     1766     1766              
   ============================================
     Files          3246     3246              
     Lines         48906    48906              
     Branches       8367     8367              
   ============================================
   + Hits          29554    29572      +18     
   + Misses        16917    16898      -19     
   - Partials       2435     2436       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L0hpbnRTb3VyY2VUeXBlLmphdmE=) | `42.85% <0.00%> (+42.85%)` | :arrow_up: |
   | [...sher/type/CreateTableStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29udGV4dC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvY29udGV4dC9yZWZyZXNoZXIvdHlwZS9DcmVhdGVUYWJsZVN0YXRlbWVudFNjaGVtYVJlZnJlc2hlci5qYXZh) | `94.73% <0.00%> (+78.94%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/14730?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/shardingsphere/pull/14730?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 [aee939b...e795ea3](https://codecov.io/gh/apache/shardingsphere/pull/14730?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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] terrymanu commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
terrymanu commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1012744069


   Please fix CI


-- 
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] Swastyy commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1033351096


   > ShardingSphereMetaData does not have a method named `containsTable`. Did you add new method to ShardingSphereMetaData?
   
   No, I have not added it. In that case can you please help what things should I change in the code?


-- 
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 removed a comment on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
terrymanu removed a comment on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1015055289


   Sorry, the CI is still failed


-- 
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] Swastyy closed pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy closed pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730


   


-- 
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] RaigorJiang commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1033350036


   > Error: /home/runner/work/shardingsphere/shardingsphere/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/refresher/type/CreateTableStatementSchemaRefresherTest.java:[95,34] cannot find symbol
   symbol: method containsTable(java.lang.String)
   location: variable schemaMetaData of type org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData
   
   ShardingSphereMetaData does not have a method named `containsTable`.
   Did you add new method to ShardingSphereMetaData?


-- 
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 edited a comment on pull request #14730: Add test case for #14083

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1046210776


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/14730?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 [#14730](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (fdd9f5c) into [master](https://codecov.io/gh/apache/shardingsphere/commit/adebed24b63823c4bff0e4f82f75e122ef42549f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (adebed2) will **increase** coverage by `0.03%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/14730/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #14730      +/-   ##
   ============================================
   + Coverage     60.42%   60.46%   +0.03%     
     Complexity     1986     1986              
   ============================================
     Files          3232     3232              
     Lines         48659    48659              
     Branches       8314     8314              
   ============================================
   + Hits          29403    29421      +18     
   + Misses        16842    16823      -19     
   - Partials       2414     2415       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L0hpbnRTb3VyY2VUeXBlLmphdmE=) | `42.85% <0.00%> (+42.85%)` | :arrow_up: |
   | [...sher/type/CreateTableStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29udGV4dC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvY29udGV4dC9yZWZyZXNoZXIvdHlwZS9DcmVhdGVUYWJsZVN0YXRlbWVudFNjaGVtYVJlZnJlc2hlci5qYXZh) | `94.73% <0.00%> (+78.94%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/14730?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/shardingsphere/pull/14730?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 [adebed2...fdd9f5c](https://codecov.io/gh/apache/shardingsphere/pull/14730?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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] RaigorJiang commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1046340701


   @Swastyy 
   This is usually caused by network problems, I can try to re-run the job.


-- 
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] RaigorJiang commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1020715063


   Hi @Swastyy 
   CI still fails. I suggest you to merge from master and then fix the compilation problem.


-- 
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 commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
terrymanu commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1015055289


   Sorry, the CI is still failed


-- 
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] RaigorJiang commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1020715063


   Hi @Swastyy 
   CI still fails. I suggest you to merge from master and then fix the compilation problem.


-- 
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 commented on a change in pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#discussion_r795228152



##########
File path: shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/refresher/type/CreateTableStatementSchemaRefresherTest.java
##########
@@ -0,0 +1,92 @@
+/*
+ * 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.infra.context.refresher.type;
+
+import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
+import org.apache.shardingsphere.infra.context.refresher.MetaDataRefresher;
+import org.apache.shardingsphere.infra.federation.optimizer.context.planner.OptimizerPlannerContext;
+import org.apache.shardingsphere.infra.federation.optimizer.metadata.FederationSchemaMetaData;
+import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableNameSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleCreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sql92.ddl.SQL92CreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sqlserver.ddl.SQLServerCreateTableStatement;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.Map;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public final class CreateTableStatementSchemaRefresherTest {
+    
+    @Test
+    public void refreshForMySQL() throws SQLException {
+        MySQLCreateTableStatement createTableStatement = new MySQLCreateTableStatement();
+        createTableStatement.setContainsNotExistClause(false);
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForOracle() throws SQLException {
+        OracleCreateTableStatement createTableStatement = new OracleCreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForPostgreSQL() throws SQLException {
+        PostgreSQLCreateTableStatement createTableStatement = new PostgreSQLCreateTableStatement();
+        createTableStatement.setContainsNotExistClause(false);
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForSQL92() throws SQLException {
+        SQL92CreateTableStatement createTableStatement = new SQL92CreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForSQLServer() throws SQLException {
+        SQLServerCreateTableStatement createTableStatement = new SQLServerCreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    private void refresh(final ShardingSphereMetaData schemaMetaData, final FederationSchemaMetaData schema, final Map<String, OptimizerPlannerContext> optimizerPlanners, 
+                         final Collection<String> logicDataSourceNames, final CreateTableStatement sqlStatement, final ConfigurationProperties props) throws SQLException {
+        sqlStatement.setTable(new SimpleTableSegment(new TableNameSegment(1, 3, new IdentifierValue("t_order_0"))));
+        DataSource dataSource = mock(DataSource.class, RETURNS_DEEP_STUBS);
+        when(dataSource.getConnection().getMetaData().getTables(any(), any(), any(), any())).thenReturn(mock(ResultSet.class));
+        //ShardingSphereSchema schema = ShardingSphereSchemaBuildUtil.buildSchema();
+        //ShardingSphereMetaData metaData = new ShardingSphereMetaData("", mock(ShardingSphereResource.class), mock(ShardingSphereRuleMetaData.class), schema);

Review comment:
       Please do not leave commented codes.




-- 
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] Swastyy commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1018700400


   > Hi, there are compile errors here, can you resolve it?
   
   Hi, I see the errors are due to coding faults, I will try to correct it. It may take some time to reach the final step i think. 


-- 
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] Swastyy closed pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy closed pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730


   


-- 
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 edited a comment on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1046210776


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/14730?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 [#14730](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (95fb6d4) into [master](https://codecov.io/gh/apache/shardingsphere/commit/c625de04d933bd34d02932684ee528230e313554?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c625de0) will **increase** coverage by `0.03%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/14730/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #14730      +/-   ##
   ============================================
   + Coverage     60.43%   60.46%   +0.03%     
     Complexity     1961     1961              
   ============================================
     Files          3232     3232              
     Lines         48574    48574              
     Branches       8293     8293              
   ============================================
   + Hits          29356    29371      +15     
   + Misses        16817    16801      -16     
   - Partials       2401     2402       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...sher/type/CreateTableStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29udGV4dC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvY29udGV4dC9yZWZyZXNoZXIvdHlwZS9DcmVhdGVUYWJsZVN0YXRlbWVudFNjaGVtYVJlZnJlc2hlci5qYXZh) | `94.73% <0.00%> (+78.94%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/14730?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/shardingsphere/pull/14730?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 [c625de0...95fb6d4](https://codecov.io/gh/apache/shardingsphere/pull/14730?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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] Swastyy commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1033346848


   Hi @RaigorJiang , can you please tell me about this error that it is true that the containsTable method cannot be used for the variables of type ShardingSphereMetaData? or is it mentioned in the docs about this method (I cannot find such) so how can I use this method for this test case
   Error:  COMPILATION ERROR : 
   [INFO] -------------------------------------------------------------
   Error:  /home/runner/work/shardingsphere/shardingsphere/shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/refresher/type/CreateTableStatementSchemaRefresherTest.java:[95,34] cannot find symbol
     symbol:   method containsTable(java.lang.String)
     location: variable schemaMetaData of type org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData
   [INFO] 1 error


-- 
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] Swastyy commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1014343562


   > The CI is still broken, please check it again
   
   I have checked the CI errors and merged the new commits, now the tests have been queued, waiting for them to finish. Thanks.


-- 
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 commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
terrymanu commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1013895838


   The CI is still broken, please check it again


-- 
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] Swastyy commented on a change in pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on a change in pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#discussion_r795375572



##########
File path: shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/refresher/type/CreateTableStatementSchemaRefresherTest.java
##########
@@ -0,0 +1,92 @@
+/*
+ * 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.infra.context.refresher.type;
+
+import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
+import org.apache.shardingsphere.infra.context.refresher.MetaDataRefresher;
+import org.apache.shardingsphere.infra.federation.optimizer.context.planner.OptimizerPlannerContext;
+import org.apache.shardingsphere.infra.federation.optimizer.metadata.FederationSchemaMetaData;
+import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableNameSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleCreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sql92.ddl.SQL92CreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sqlserver.ddl.SQLServerCreateTableStatement;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.Map;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public final class CreateTableStatementSchemaRefresherTest {
+    
+    @Test
+    public void refreshForMySQL() throws SQLException {
+        MySQLCreateTableStatement createTableStatement = new MySQLCreateTableStatement();
+        createTableStatement.setContainsNotExistClause(false);
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForOracle() throws SQLException {
+        OracleCreateTableStatement createTableStatement = new OracleCreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForPostgreSQL() throws SQLException {
+        PostgreSQLCreateTableStatement createTableStatement = new PostgreSQLCreateTableStatement();
+        createTableStatement.setContainsNotExistClause(false);
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForSQL92() throws SQLException {
+        SQL92CreateTableStatement createTableStatement = new SQL92CreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForSQLServer() throws SQLException {
+        SQLServerCreateTableStatement createTableStatement = new SQLServerCreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    private void refresh(final ShardingSphereMetaData schemaMetaData, final FederationSchemaMetaData schema, final Map<String, OptimizerPlannerContext> optimizerPlanners, 
+                         final Collection<String> logicDataSourceNames, final CreateTableStatement sqlStatement, final ConfigurationProperties props) throws SQLException {
+        sqlStatement.setTable(new SimpleTableSegment(new TableNameSegment(1, 3, new IdentifierValue("t_order_0"))));
+        DataSource dataSource = mock(DataSource.class, RETURNS_DEEP_STUBS);
+        when(dataSource.getConnection().getMetaData().getTables(any(), any(), any(), any())).thenReturn(mock(ResultSet.class));
+        //ShardingSphereSchema schema = ShardingSphereSchemaBuildUtil.buildSchema();
+        //ShardingSphereMetaData metaData = new ShardingSphereMetaData("", mock(ShardingSphereResource.class), mock(ShardingSphereRuleMetaData.class), schema);

Review comment:
       Hi @terrymanu , why the [OracleCreateTableStatement.java](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleCreateTableStatement.java) is empty? I mean it does not implements anything.




-- 
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] Swastyy commented on a change in pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on a change in pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#discussion_r795375572



##########
File path: shardingsphere-infra/shardingsphere-infra-context/src/test/java/org/apache/shardingsphere/infra/context/refresher/type/CreateTableStatementSchemaRefresherTest.java
##########
@@ -0,0 +1,92 @@
+/*
+ * 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.infra.context.refresher.type;
+
+import org.apache.shardingsphere.infra.config.props.ConfigurationProperties;
+import org.apache.shardingsphere.infra.context.refresher.MetaDataRefresher;
+import org.apache.shardingsphere.infra.federation.optimizer.context.planner.OptimizerPlannerContext;
+import org.apache.shardingsphere.infra.federation.optimizer.metadata.FederationSchemaMetaData;
+import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.TableNameSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.value.identifier.IdentifierValue;
+import org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.oracle.ddl.OracleCreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.postgresql.ddl.PostgreSQLCreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sql92.ddl.SQL92CreateTableStatement;
+import org.apache.shardingsphere.sql.parser.sql.dialect.statement.sqlserver.ddl.SQLServerCreateTableStatement;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.Map;
+
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public final class CreateTableStatementSchemaRefresherTest {
+    
+    @Test
+    public void refreshForMySQL() throws SQLException {
+        MySQLCreateTableStatement createTableStatement = new MySQLCreateTableStatement();
+        createTableStatement.setContainsNotExistClause(false);
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForOracle() throws SQLException {
+        OracleCreateTableStatement createTableStatement = new OracleCreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForPostgreSQL() throws SQLException {
+        PostgreSQLCreateTableStatement createTableStatement = new PostgreSQLCreateTableStatement();
+        createTableStatement.setContainsNotExistClause(false);
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForSQL92() throws SQLException {
+        SQL92CreateTableStatement createTableStatement = new SQL92CreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    @Test
+    public void refreshForSQLServer() throws SQLException {
+        SQLServerCreateTableStatement createTableStatement = new SQLServerCreateTableStatement();
+        refresh(createTableStatement);
+    }
+    
+    private void refresh(final ShardingSphereMetaData schemaMetaData, final FederationSchemaMetaData schema, final Map<String, OptimizerPlannerContext> optimizerPlanners, 
+                         final Collection<String> logicDataSourceNames, final CreateTableStatement sqlStatement, final ConfigurationProperties props) throws SQLException {
+        sqlStatement.setTable(new SimpleTableSegment(new TableNameSegment(1, 3, new IdentifierValue("t_order_0"))));
+        DataSource dataSource = mock(DataSource.class, RETURNS_DEEP_STUBS);
+        when(dataSource.getConnection().getMetaData().getTables(any(), any(), any(), any())).thenReturn(mock(ResultSet.class));
+        //ShardingSphereSchema schema = ShardingSphereSchemaBuildUtil.buildSchema();
+        //ShardingSphereMetaData metaData = new ShardingSphereMetaData("", mock(ShardingSphereResource.class), mock(ShardingSphereRuleMetaData.class), schema);

Review comment:
       Hi @terrymanu , why the [OracleCreateTableStatement.java](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/oracle/ddl/OracleCreateTableStatement.java) is empty? I mean it does not implements anything.




-- 
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] TeslaCN commented on pull request #14730: Add test case for #14083

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1081346851


   Hi @Swastyy 
   Please merge the master branch.


-- 
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 edited a comment on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1046210776


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/14730?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 [#14730](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (13b78df) into [master](https://codecov.io/gh/apache/shardingsphere/commit/4ee392c920ac800d1d0667f094e92f2c9b9aeded?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4ee392c) will **increase** coverage by `0.03%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/14730/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #14730      +/-   ##
   ============================================
   + Coverage     60.46%   60.49%   +0.03%     
     Complexity     1958     1958              
   ============================================
     Files          3223     3223              
     Lines         48483    48483              
     Branches       8279     8279              
   ============================================
   + Hits          29313    29328      +15     
   + Misses        16773    16757      -16     
   - Partials       2397     2398       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/14730?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...sher/type/CreateTableStatementSchemaRefresher.java](https://codecov.io/gh/apache/shardingsphere/pull/14730/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29udGV4dC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvY29udGV4dC9yZWZyZXNoZXIvdHlwZS9DcmVhdGVUYWJsZVN0YXRlbWVudFNjaGVtYVJlZnJlc2hlci5qYXZh) | `94.73% <0.00%> (+78.94%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/14730?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/shardingsphere/pull/14730?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 [4ee392c...13b78df](https://codecov.io/gh/apache/shardingsphere/pull/14730?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: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] Swastyy commented on pull request #14730: learning to make test cases

Posted by GitBox <gi...@apache.org>.
Swastyy commented on pull request #14730:
URL: https://github.com/apache/shardingsphere/pull/14730#issuecomment-1046437563


   > @Swastyy This is usually caused by network problems, I can try to re-run the job.
   
   Okk @RaigorJiang Thanks.


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