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/05/25 03:20:08 UTC
[GitHub] [shardingsphere] complone opened a new pull request, #17928: Add test for OptimizerSqlDialectBuilderFactory
complone opened a new pull request, #17928:
URL: https://github.com/apache/shardingsphere/pull/17928
Fixes #issue_17552
Changes proposed in this pull request:
- Add test for OptimizerSqlDialectBuilderFactory
-
-
--
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] complone commented on a diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
complone commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r901125369
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,36 @@
+/*
+ * 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.federation.optimizer.context.parser.dialect;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import org.junit.Test;
+
+public final class OptimizerSQLDialectBuilderFactoryTest {
Review Comment:
i'm solved
--
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] yx9o commented on a diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r881266478
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.database.type.DatabaseType;
+import org.apache.shardingsphere.infra.database.type.DatabaseTypeFactory;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect.impl.MySQLOptimizerBuilder;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(MockitoJUnitRunner.class)
+public class OptimizerSQLDialectBuilderFactoryTest {
+
+ @Test
+ public void assertCreateOptimizerSQLDialectBuilder() {
+ DatabaseType databaseType = DatabaseTypeFactory.getInstance("MySQL");
+ OptimizerSQLDialectBuilder optimizerSQLDialectBuilder = new OptimizerSQLDialectBuilderFixture(databaseType);
+ assertEquals(optimizerSQLDialectBuilder.getClass(), MySQLOptimizerBuilder.class);
+ Properties properties = optimizerSQLDialectBuilder.build();
+ assertEquals(properties, new Properties());
+
Review Comment:
Please remove unnecessary blank lines.
--
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] yx9o commented on pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
yx9o commented on PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#issuecomment-1156433521
@complone Thank you, good 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] yx9o commented on a diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r889433840
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.federation.optimizer.context.parser.dialect;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(MockitoJUnitRunner.class)
+public final class OptimizerSQLDialectBuilderFactoryTest {
+
+ @Test
+ public void assertCreateOptimizerSQLDialectBuilder() {
+ OptimizerSQLDialectBuilder optimizerSQLDialectBuilder = new OptimizerSQLDialectBuilderFixture();
+ assertEquals(optimizerSQLDialectBuilder.getType(), "FIXTURE");
+ Properties properties = optimizerSQLDialectBuilder.build();
+ assertEquals(properties, new Properties());
+
Review Comment:
Please remove unnecessary blank lines.
--
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] yx9o commented on a diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r889433754
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.federation.optimizer.context.parser.dialect;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(MockitoJUnitRunner.class)
+public final class OptimizerSQLDialectBuilderFactoryTest {
+
+ @Test
+ public void assertCreateOptimizerSQLDialectBuilder() {
+ OptimizerSQLDialectBuilder optimizerSQLDialectBuilder = new OptimizerSQLDialectBuilderFixture();
+ assertEquals(optimizerSQLDialectBuilder.getType(), "FIXTURE");
Review Comment:
Please use `assertThat` to instead of `assertEquals`.
--
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] complone commented on pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
complone commented on PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#issuecomment-1156409047
> Please fix the code review suggestions.
i'm finished
--
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 diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
terrymanu commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r900935700
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,36 @@
+/*
+ * 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.federation.optimizer.context.parser.dialect;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import org.junit.Test;
+
+public final class OptimizerSQLDialectBuilderFactoryTest {
+
+ @Test
+ public void assertCreateOptimizerSQLDialectBuilder() {
+ OptimizerSQLDialectBuilder optimizerSQLDialectBuilder = new OptimizerSQLDialectBuilderFixture();
+ assertThat(optimizerSQLDialectBuilder.getType(), is("FIXTURE"));
+ Properties properties = optimizerSQLDialectBuilder.build();
+ assertThat(properties, equalTo(new Properties()));
Review Comment:
We prefer use `is` to instead of `equalTo`
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,36 @@
+/*
+ * 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.federation.optimizer.context.parser.dialect;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import org.junit.Test;
+
+public final class OptimizerSQLDialectBuilderFactoryTest {
Review Comment:
This test case do not include any code of `OptimizerSQLDialectBuilderFactory`, why the class name is `OptimizerSQLDialectBuilderFactoryTest`?
--
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] yx9o commented on a diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r881269162
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect;
Review Comment:
Please add license information in the file header, refer to other files.
--
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] yx9o commented on a diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r881276073
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.database.type.DatabaseType;
+import org.apache.shardingsphere.infra.database.type.DatabaseTypeFactory;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect.impl.MySQLOptimizerBuilder;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(MockitoJUnitRunner.class)
+public class OptimizerSQLDialectBuilderFactoryTest {
Review Comment:
Please add final.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#issuecomment-1145610266
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/17928?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 [#17928](https://codecov.io/gh/apache/shardingsphere/pull/17928?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d5e8a37) into [master](https://codecov.io/gh/apache/shardingsphere/commit/64cb3df3f968126c003e582870066813a6c4efed?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (64cb3df) will **decrease** coverage by `0.05%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #17928 +/- ##
============================================
- Coverage 59.13% 59.08% -0.06%
- Complexity 2136 2170 +34
============================================
Files 3616 3692 +76
Lines 53520 54362 +842
Branches 9128 9246 +118
============================================
+ Hits 31650 32119 +469
- Misses 19188 19499 +311
- Partials 2682 2744 +62
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/17928?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/17928/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: |
| [...gsphere/encrypt/context/EncryptContextBuilder.java](https://codecov.io/gh/apache/shardingsphere/pull/17928/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZW5jcnlwdC9zaGFyZGluZ3NwaGVyZS1lbmNyeXB0LWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2VuY3J5cHQvY29udGV4dC9FbmNyeXB0Q29udGV4dEJ1aWxkZXIuamF2YQ==) | `50.00% <0.00%> (-38.89%)` | :arrow_down: |
| [...atus/compute/service/ComputeNodeStatusService.java](https://codecov.io/gh/apache/shardingsphere/pull/17928/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9yZWdpc3RyeS9zdGF0dXMvY29tcHV0ZS9zZXJ2aWNlL0NvbXB1dGVOb2RlU3RhdHVzU2VydmljZS5qYXZh) | `69.38% <0.00%> (-30.62%)` | :arrow_down: |
| [.../shardingsphere/transaction/TransactionHolder.java](https://codecov.io/gh/apache/shardingsphere/pull/17928/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLXRyYW5zYWN0aW9uL3NoYXJkaW5nc3BoZXJlLXRyYW5zYWN0aW9uLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3RyYW5zYWN0aW9uL1RyYW5zYWN0aW9uSG9sZGVyLmphdmE=) | `72.72% <0.00%> (-27.28%)` | :arrow_down: |
| [...binder/statement/ddl/DropViewStatementContext.java](https://codecov.io/gh/apache/shardingsphere/pull/17928/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc3RhdGVtZW50L2RkbC9Ecm9wVmlld1N0YXRlbWVudENvbnRleHQuamF2YQ==) | `75.00% <0.00%> (-25.00%)` | :arrow_down: |
| [...nder/statement/ddl/CreateViewStatementContext.java](https://codecov.io/gh/apache/shardingsphere/pull/17928/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc3RhdGVtZW50L2RkbC9DcmVhdGVWaWV3U3RhdGVtZW50Q29udGV4dC5qYXZh) | `83.33% <0.00%> (-16.67%)` | :arrow_down: |
| [...lock/mutex/ShardingSphereInterMutexLockHolder.java](https://codecov.io/gh/apache/shardingsphere/pull/17928/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9sb2NrL211dGV4L1NoYXJkaW5nU3BoZXJlSW50ZXJNdXRleExvY2tIb2xkZXIuamF2YQ==) | `40.00% <0.00%> (-16.25%)` | :arrow_down: |
| [.../impl/StandardPipelineDataSourceConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/17928/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-c2hhcmRpbmdzcGhlcmUta2VybmVsL3NoYXJkaW5nc3BoZXJlLWRhdGEtcGlwZWxpbmUvc2hhcmRpbmdzcGhlcmUtZGF0YS1waXBlbGluZS1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RhdGEvcGlwZWxpbmUvYXBpL2RhdGFzb3VyY2UvY29uZmlnL2ltcGwvU3RhbmRhcmRQaXBlbGluZURhdGFTb3VyY2VDb25maWd1cmF0aW9uLmphdmE=) | `82.85% <0.00%> (-13.15%)` | :arrow_down: |
| [...ata/impl/SchemaAssignedDatabaseBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/17928/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2RhdGEvaW1wbC9TY2hlbWFBc3NpZ25lZERhdGFiYXNlQmFja2VuZEhhbmRsZXIuamF2YQ==) | `24.13% <0.00%> (-12.71%)` | :arrow_down: |
| [...a/subscriber/SchemaMetaDataRegistrySubscriber.java](https://codecov.io/gh/apache/shardingsphere/pull/17928/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtY2x1c3Rlci1tb2RlL3NoYXJkaW5nc3BoZXJlLWNsdXN0ZXItbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvY2x1c3Rlci9jb29yZGluYXRvci9yZWdpc3RyeS9tZXRhZGF0YS9zdWJzY3JpYmVyL1NjaGVtYU1ldGFEYXRhUmVnaXN0cnlTdWJzY3JpYmVyLmphdmE=) | `87.50% <0.00%> (-12.50%)` | :arrow_down: |
| ... and [418 more](https://codecov.io/gh/apache/shardingsphere/pull/17928/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/17928?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/17928?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 [64cb3df...d5e8a37](https://codecov.io/gh/apache/shardingsphere/pull/17928?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] yx9o commented on a diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r891852546
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect.OptimizerSQLDialectBuilder:
##########
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture
Review Comment:
@complone This is not resolved.
--
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] yx9o commented on a diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r881268239
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,26 @@
+package org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.database.type.DatabaseType;
+import org.apache.shardingsphere.infra.database.type.DatabaseTypeFactory;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect.impl.MySQLOptimizerBuilder;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(MockitoJUnitRunner.class)
+public class OptimizerSQLDialectBuilderFactoryTest {
+
+ @Test
+ public void assertCreateOptimizerSQLDialectBuilder() {
+ DatabaseType databaseType = DatabaseTypeFactory.getInstance("MySQL");
+ OptimizerSQLDialectBuilder optimizerSQLDialectBuilder = new OptimizerSQLDialectBuilderFixture(databaseType);
+ assertEquals(optimizerSQLDialectBuilder.getClass(), MySQLOptimizerBuilder.class);
Review Comment:
Please use `assertThat` to instead of `assertEquals`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu merged pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
terrymanu merged PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928
--
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 diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
terrymanu commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r881301294
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/resources/META-INF/services/org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect.OptimizerSQLDialectBuilder:
##########
@@ -0,0 +1,18 @@
+#
+# 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.
+#
+
+org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture
Review Comment:
Please add new line in the end of file
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/fixture/OptimizerSQLDialectBuilderFixture.java:
##########
@@ -0,0 +1,24 @@
+package org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.database.type.DatabaseType;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.dialect.OptimizerSQLDialectBuilder;
+
+public class OptimizerSQLDialectBuilderFixture implements OptimizerSQLDialectBuilder {
Review Comment:
Please add final if class is not designed for extension
##########
.github/workflows/ci.yml:
##########
@@ -21,6 +21,8 @@
name: Continuous Integration
on:
+ workflow_run:
+ workflows: [Run Tests]
Review Comment:
What is the useful?
--
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] yx9o commented on a diff in pull request #17928: Add test for OptimizerSqlDialectBuilderFactory
Posted by GitBox <gi...@apache.org>.
yx9o commented on code in PR #17928:
URL: https://github.com/apache/shardingsphere/pull/17928#discussion_r889434074
##########
shardingsphere-infra/shardingsphere-infra-federation/shardingsphere-infra-federation-optimizer/src/test/java/org/apache/shardingsphere/infra/federation/optimizer/context/parser/dialect/OptimizerSQLDialectBuilderFactoryTest.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.federation.optimizer.context.parser.dialect;
+
+import java.util.Properties;
+import org.apache.shardingsphere.infra.federation.optimizer.context.parser.fixture.OptimizerSQLDialectBuilderFixture;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnitRunner;
+
+import static org.junit.Assert.assertEquals;
+
+@RunWith(MockitoJUnitRunner.class)
Review Comment:
`@RunWith` is not required.
--
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