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 2020/08/31 03:43:27 UTC
[GitHub] [shardingsphere] victorzhangchn opened a new pull request #7165: Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
victorzhangchn opened a new pull request #7165:
URL: https://github.com/apache/shardingsphere/pull/7165
Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
Fixes #7012.
Changes proposed in this pull request:
- Reorganize imports of DataSourceConverterTest.java.
- Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success, using spi mock class.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] victorzhangchn commented on a change in pull request #7165: Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
Posted by GitBox <gi...@apache.org>.
victorzhangchn commented on a change in pull request #7165:
URL: https://github.com/apache/shardingsphere/pull/7165#discussion_r480002858
##########
File path: shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MockMySQLProtocolFrontendEngine.java
##########
@@ -0,0 +1,58 @@
+/*
+ * 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.proxy.frontend.mysql;
+
+import org.apache.shardingsphere.db.protocol.codec.DatabasePacketCodecEngine;
+import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
+import org.apache.shardingsphere.proxy.frontend.context.FrontendContext;
+import org.apache.shardingsphere.proxy.frontend.engine.AuthenticationEngine;
+import org.apache.shardingsphere.proxy.frontend.engine.CommandExecuteEngine;
+import org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine;
+
+public final class MockMySQLProtocolFrontendEngine implements DatabaseProtocolFrontendEngine {
Review comment:
OK, you are right, I will change this.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on a change in pull request #7165: Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #7165:
URL: https://github.com/apache/shardingsphere/pull/7165#discussion_r479974565
##########
File path: shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MockMySQLProtocolFrontendEngine.java
##########
@@ -0,0 +1,58 @@
+/*
+ * 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.proxy.frontend.mysql;
+
+import org.apache.shardingsphere.db.protocol.codec.DatabasePacketCodecEngine;
+import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
+import org.apache.shardingsphere.proxy.frontend.context.FrontendContext;
+import org.apache.shardingsphere.proxy.frontend.engine.AuthenticationEngine;
+import org.apache.shardingsphere.proxy.frontend.engine.CommandExecuteEngine;
+import org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine;
+
+public final class MockMySQLProtocolFrontendEngine implements DatabaseProtocolFrontendEngine {
Review comment:
It is better to rename `MockMySQLProtocolFrontendEngine` to `MockProtocolFrontendEngine`, because MySQL is just a type of implementation.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] victorzhangchn commented on a change in pull request #7165: Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
Posted by GitBox <gi...@apache.org>.
victorzhangchn commented on a change in pull request #7165:
URL: https://github.com/apache/shardingsphere/pull/7165#discussion_r480023684
##########
File path: shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MockMySQLProtocolFrontendEngine.java
##########
@@ -0,0 +1,58 @@
+/*
+ * 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.proxy.frontend.mysql;
+
+import org.apache.shardingsphere.db.protocol.codec.DatabasePacketCodecEngine;
+import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
+import org.apache.shardingsphere.proxy.frontend.context.FrontendContext;
+import org.apache.shardingsphere.proxy.frontend.engine.AuthenticationEngine;
+import org.apache.shardingsphere.proxy.frontend.engine.CommandExecuteEngine;
+import org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine;
+
+public final class MockMySQLProtocolFrontendEngine implements DatabaseProtocolFrontendEngine {
Review comment:
CI failed due to:
[ERROR] Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.98 s <<< FAILURE! - in org.apache.shardingsphere.proxy.governance.schema.ProxyGovernanceSchemaContextsTest
[ERROR] unnecessary Mockito stubbings(org.apache.shardingsphere.proxy.governance.schema.ProxyGovernanceSchemaContextsTest) Time elapsed: 0.034 s <<< ERROR!
org.mockito.exceptions.misusing.UnnecessaryStubbingException:
Unnecessary stubbings detected in test class: ProxyGovernanceSchemaContextsTest
Clean & maintainable test code requires zero unnecessary code.
Following stubbings are unnecessary (click to navigate to relevant line of code):
1. -> at org.apache.shardingsphere.proxy.governance.schema.ProxyGovernanceSchemaContextsTest.getProxyGovernanceSchemaContexts(ProxyGovernanceSchemaContextsTest.java:83)
Please remove unnecessary stubbings or use 'silent' option. More info: javadoc for UnnecessaryStubbingException class.
How can I retrigger 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] victorzhangchn commented on a change in pull request #7165: Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
Posted by GitBox <gi...@apache.org>.
victorzhangchn commented on a change in pull request #7165:
URL: https://github.com/apache/shardingsphere/pull/7165#discussion_r480023684
##########
File path: shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-core/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MockMySQLProtocolFrontendEngine.java
##########
@@ -0,0 +1,58 @@
+/*
+ * 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.proxy.frontend.mysql;
+
+import org.apache.shardingsphere.db.protocol.codec.DatabasePacketCodecEngine;
+import org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
+import org.apache.shardingsphere.proxy.frontend.context.FrontendContext;
+import org.apache.shardingsphere.proxy.frontend.engine.AuthenticationEngine;
+import org.apache.shardingsphere.proxy.frontend.engine.CommandExecuteEngine;
+import org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine;
+
+public final class MockMySQLProtocolFrontendEngine implements DatabaseProtocolFrontendEngine {
Review comment:
CI failed due to:
[ERROR] Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.98 s <<< FAILURE! - in org.apache.shardingsphere.proxy.governance.schema.ProxyGovernanceSchemaContextsTest
[ERROR] unnecessary Mockito stubbings(org.apache.shardingsphere.proxy.governance.schema.ProxyGovernanceSchemaContextsTest) Time elapsed: 0.034 s <<< ERROR!
org.mockito.exceptions.misusing.UnnecessaryStubbingException:
Unnecessary stubbings detected in test class: ProxyGovernanceSchemaContextsTest
Clean & maintainable test code requires zero unnecessary code.
Following stubbings are unnecessary (click to navigate to relevant line of code):
1. -> at org.apache.shardingsphere.proxy.governance.schema.ProxyGovernanceSchemaContextsTest.getProxyGovernanceSchemaContexts(ProxyGovernanceSchemaContextsTest.java:83)
Please remove unnecessary stubbings or use 'silent' option. More info: javadoc for UnnecessaryStubbingException class.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on pull request #7165: Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
Posted by GitBox <gi...@apache.org>.
terrymanu commented on pull request #7165:
URL: https://github.com/apache/shardingsphere/pull/7165#issuecomment-683866503
Duplicate with #7151
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on pull request #7165: Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
Posted by GitBox <gi...@apache.org>.
terrymanu commented on pull request #7165:
URL: https://github.com/apache/shardingsphere/pull/7165#issuecomment-683815222
This pr is duplicate with ##7151, could you discuss with the author and keep only one for this issue?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] coveralls commented on pull request #7165: Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #7165:
URL: https://github.com/apache/shardingsphere/pull/7165#issuecomment-683558322
## Pull Request Test Coverage Report for [Build 14277](https://coveralls.io/builds/33105582)
* **0** of **0** changed or added relevant lines in **0** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.003%**) to **35.635%**
---
| Totals | [](https://coveralls.io/builds/33105582) |
| :-- | --: |
| Change from base [Build 14276](https://coveralls.io/builds/33105029): | 0.003% |
| Covered Lines: | 35564 |
| Relevant Lines: | 99801 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed pull request #7165: Add test case for DatabaseProtocolFrontendEngineFactory when newInstance success (#7012)
Posted by GitBox <gi...@apache.org>.
terrymanu closed pull request #7165:
URL: https://github.com/apache/shardingsphere/pull/7165
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org