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/20 08:07:43 UTC

[GitHub] [shardingsphere] taojintianxia opened a new pull request #6951: Scaling refactor

taojintianxia opened a new pull request #6951:
URL: https://github.com/apache/shardingsphere/pull/6951


   Changes proposed in this pull request:
   - refactor the code whenever read the code need to change
   


----------------------------------------------------------------
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] Lucas-307 commented on a change in pull request #6951: Scaling refactor

Posted by GitBox <gi...@apache.org>.
Lucas-307 commented on a change in pull request #6951:
URL: https://github.com/apache/shardingsphere/pull/6951#discussion_r474378529



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java
##########
@@ -28,12 +30,11 @@
 /**
  * Database type of H2.
  */
+@EqualsAndHashCode
 public final class H2DatabaseType implements BranchDatabaseType {
     
-    @Override
-    public String getName() {
-        return "H2";
-    }
+    @Getter

Review comment:
       maybe put @Getter above class is better.




----------------------------------------------------------------
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] Lucas-307 commented on a change in pull request #6951: Scaling refactor

Posted by GitBox <gi...@apache.org>.
Lucas-307 commented on a change in pull request #6951:
URL: https://github.com/apache/shardingsphere/pull/6951#discussion_r474378529



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java
##########
@@ -28,12 +30,11 @@
 /**
  * Database type of H2.
  */
+@EqualsAndHashCode
 public final class H2DatabaseType implements BranchDatabaseType {
     
-    @Override
-    public String getName() {
-        return "H2";
-    }
+    @Getter

Review comment:
       maybe put @Getter above classs is better.




----------------------------------------------------------------
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 merged pull request #6951: Scaling refactor

Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #6951:
URL: https://github.com/apache/shardingsphere/pull/6951


   


----------------------------------------------------------------
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 #6951: Scaling refactor

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



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java
##########
@@ -28,12 +30,11 @@
 /**
  * Database type of H2.
  */
+@EqualsAndHashCode
 public final class H2DatabaseType implements BranchDatabaseType {
     
-    @Override
-    public String getName() {
-        return "H2";
-    }
+    @Getter
+    private final String name = "H2";

Review comment:
       Please do not change original code if unnecessary.




----------------------------------------------------------------
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] Lucas-307 commented on a change in pull request #6951: Scaling refactor

Posted by GitBox <gi...@apache.org>.
Lucas-307 commented on a change in pull request #6951:
URL: https://github.com/apache/shardingsphere/pull/6951#discussion_r473875929



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java
##########
@@ -49,4 +49,12 @@ public H2DataSourceMetaData getDataSourceMetaData(final String url, final String
     public DatabaseType getTrunkDatabaseType() {
         return DatabaseTypes.getActualDatabaseType("MySQL");
     }
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (!(obj instanceof DatabaseType)) {
+            return false;
+        }
+        return getName().equals(((DatabaseType) obj).getName());
+    }

Review comment:
       Please replace with @EqualsAndHashCode.




----------------------------------------------------------------
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 edited a comment on pull request #6951: Scaling refactor

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #6951:
URL: https://github.com/apache/shardingsphere/pull/6951#issuecomment-677529267


   ## Pull Request Test Coverage Report for [Build 13956](https://coveralls.io/builds/32905361)
   
   * **10** of **16**   **(62.5%)**  changed or added relevant lines in **8** files are covered.
   * **156** unchanged lines in **3** files lost coverage.
   * Overall coverage increased (+**0.01%**) to **60.302%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java](https://coveralls.io/builds/32905361/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FH2DatabaseType.java#L33) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MariaDBDatabaseType.java](https://coveralls.io/builds/32905361/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FMariaDBDatabaseType.java#L33) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/OracleDatabaseType.java](https://coveralls.io/builds/32905361/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FOracleDatabaseType.java#L31) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseType.java](https://coveralls.io/builds/32905361/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FPostgreSQLDatabaseType.java#L31) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/SQL92DatabaseType.java](https://coveralls.io/builds/32905361/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FSQL92DatabaseType.java#L31) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/SQLServerDatabaseType.java](https://coveralls.io/builds/32905361/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FSQLServerDatabaseType.java#L31) | 1 | 2 | 50.0%
   <!-- | **Total:** | **10** | **16** | **62.5%** | -->
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/main/java/org/apache/shardingsphere/spring/namespace/orchestration/parser/DataSourceBeanDefinitionParser.java](https://coveralls.io/builds/32905361/source?filename=shardingsphere-jdbc%2Fshardingsphere-jdbc-spring%2Fshardingsphere-jdbc-orchestration-spring%2Fshardingsphere-jdbc-orchestration-spring-namespace%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fspring%2Fnamespace%2Forchestration%2Fparser%2FDataSourceBeanDefinitionParser.java#L52) | 3 | 86.36% |
   | [shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/datasource/OrchestrationShardingSphereDataSource.java](https://coveralls.io/builds/32905361/source?filename=shardingsphere-jdbc%2Fshardingsphere-jdbc-orchestration%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fdriver%2Forchestration%2Finternal%2Fdatasource%2FOrchestrationShardingSphereDataSource.java#L112) | 66 | 50.0% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/impl/MySQLDMLVisitor.java](https://coveralls.io/builds/32905361/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-dialect%2Fshardingsphere-sql-parser-mysql%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fmysql%2Fvisitor%2Fimpl%2FMySQLDMLVisitor.java#L203) | 87 | 0% |
   <!-- | **Total:** | **156** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/32905361/badge)](https://coveralls.io/builds/32905361) |
   | :-- | --: |
   | Change from base [Build 13931](https://coveralls.io/builds/32882550): |  0.01% |
   | Covered Lines: | 13773 |
   | Relevant Lines: | 22840 |
   
   ---
   ##### 💛  - [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] taojintianxia commented on a change in pull request #6951: Scaling refactor

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



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java
##########
@@ -49,4 +49,12 @@ public H2DataSourceMetaData getDataSourceMetaData(final String url, final String
     public DatabaseType getTrunkDatabaseType() {
         return DatabaseTypes.getActualDatabaseType("MySQL");
     }
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (!(obj instanceof DatabaseType)) {
+            return false;
+        }
+        return getName().equals(((DatabaseType) obj).getName());
+    }

Review comment:
       thx for your guide




----------------------------------------------------------------
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 #6951: Scaling refactor

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


   ## Pull Request Test Coverage Report for [Build 13930](https://coveralls.io/builds/32882090)
   
   * **2** of **2**   **(100.0%)**  changed or added relevant lines in **1** file are covered.
   * **95** unchanged lines in **13** files lost coverage.
   * Overall coverage decreased (**-0.06%**) to **60.237%**
   
   ---
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-config/src/main/java/org/apache/shardingsphere/orchestration/core/config/ConfigCenter.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-control-panel%2Fshardingsphere-orchestration%2Fshardingsphere-orchestration-core%2Fshardingsphere-orchestration-core-config%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fconfig%2FConfigCenter.java#L175) | 1 | 89.91% |
   | [shardingsphere-rdl-parser/shardingsphere-rdl-parser-binder/src/main/java/org/apache/shardingsphere/rdl/parser/binder/util/ShardingAlgorithmPropertiesUtil.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-rdl-parser%2Fshardingsphere-rdl-parser-binder%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Frdl%2Fparser%2Fbinder%2Futil%2FShardingAlgorithmPropertiesUtil.java#L64) | 2 | 0% |
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FH2DatabaseType.java#L55) | 3 | 62.5% |
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MariaDBDatabaseType.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FMariaDBDatabaseType.java#L55) | 3 | 62.5% |
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MySQLDatabaseType.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FMySQLDatabaseType.java#L48) | 3 | 57.14% |
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/OracleDatabaseType.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FOracleDatabaseType.java#L48) | 3 | 57.14% |
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseType.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FPostgreSQLDatabaseType.java#L48) | 3 | 57.14% |
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/SQL92DatabaseType.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FSQL92DatabaseType.java#L48) | 3 | 57.14% |
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/SQLServerDatabaseType.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FSQLServerDatabaseType.java#L48) | 3 | 57.14% |
   | [shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/OrchestrationSpringBootConfiguration.java](https://coveralls.io/builds/32882090/source?filename=shardingsphere-jdbc%2Fshardingsphere-jdbc-spring%2Fshardingsphere-jdbc-orchestration-spring%2Fshardingsphere-jdbc-orchestration-spring-boot-starter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fspring%2Fboot%2Forchestration%2FOrchestrationSpringBootConfiguration.java#L87) | 8 | 60.0% |
   <!-- | **Total:** | **95** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/32882090/badge)](https://coveralls.io/builds/32882090) |
   | :-- | --: |
   | Change from base [Build 13918](https://coveralls.io/builds/32856926): |  -0.06% |
   | Covered Lines: | 13731 |
   | Relevant Lines: | 22795 |
   
   ---
   ##### 💛  - [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 commented on a change in pull request #6951: Scaling refactor

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



##########
File path: shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/config/JDBCDataSourceConfigurationTest.java
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.scaling.core.config;
+
+import org.apache.shardingsphere.infra.database.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.type.dialect.MariaDBDatabaseType;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertThat;
+
+public final class JDBCDataSourceConfigurationTest {
+    
+    @Test
+    public void assertJDBCDataSourceConfigurationEquals() {
+        JDBCDataSourceConfiguration sourceConfiguration = new JDBCDataSourceConfiguration("jdbc:mysql://127.0.0.1:3306/test2?serverTimezone=UTC&useSSL=false", "root", "root");
+        JDBCDataSourceConfiguration targetConfiguration = new JDBCDataSourceConfiguration("jdbc:mysql://127.0.0.1:3306/test2?serverTimezone=UTC&useSSL=false", "root", "root");
+        assertThat(sourceConfiguration, is(targetConfiguration));
+        
+        sourceConfiguration.setDatabaseType(new MariaDBDatabaseType());
+        targetConfiguration.setDatabaseType(new MariaDBDatabaseType());
+        assertThat(sourceConfiguration, is(targetConfiguration));
+    }
+    
+    @Test
+    public void assertJDBCDataSourceConfigurationNotEquals() {
+        JDBCDataSourceConfiguration sourceConfiguration = new JDBCDataSourceConfiguration("jdbc:mysql://127.0.0.1:3306/test2?serverTimezone=UTC&useSSL=false", "sa", "root");
+        JDBCDataSourceConfiguration targetConfiguration = new JDBCDataSourceConfiguration("jdbc:mysql://127.0.0.1:3306/test2?serverTimezone=UTC&useSSL=false", "root", "root");
+        assertThat(sourceConfiguration, not(targetConfiguration));
+

Review comment:
       Please remove useless blank line




----------------------------------------------------------------
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] taojintianxia commented on a change in pull request #6951: Scaling refactor

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



##########
File path: shardingsphere-scaling/shardingsphere-scaling-core/src/test/java/org/apache/shardingsphere/scaling/core/config/JDBCDataSourceConfigurationTest.java
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.scaling.core.config;
+
+import org.apache.shardingsphere.infra.database.type.dialect.H2DatabaseType;
+import org.apache.shardingsphere.infra.database.type.dialect.MariaDBDatabaseType;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertThat;
+
+public final class JDBCDataSourceConfigurationTest {
+    
+    @Test
+    public void assertJDBCDataSourceConfigurationEquals() {
+        JDBCDataSourceConfiguration sourceConfiguration = new JDBCDataSourceConfiguration("jdbc:mysql://127.0.0.1:3306/test2?serverTimezone=UTC&useSSL=false", "root", "root");
+        JDBCDataSourceConfiguration targetConfiguration = new JDBCDataSourceConfiguration("jdbc:mysql://127.0.0.1:3306/test2?serverTimezone=UTC&useSSL=false", "root", "root");
+        assertThat(sourceConfiguration, is(targetConfiguration));
+        
+        sourceConfiguration.setDatabaseType(new MariaDBDatabaseType());
+        targetConfiguration.setDatabaseType(new MariaDBDatabaseType());
+        assertThat(sourceConfiguration, is(targetConfiguration));
+    }
+    
+    @Test
+    public void assertJDBCDataSourceConfigurationNotEquals() {
+        JDBCDataSourceConfiguration sourceConfiguration = new JDBCDataSourceConfiguration("jdbc:mysql://127.0.0.1:3306/test2?serverTimezone=UTC&useSSL=false", "sa", "root");
+        JDBCDataSourceConfiguration targetConfiguration = new JDBCDataSourceConfiguration("jdbc:mysql://127.0.0.1:3306/test2?serverTimezone=UTC&useSSL=false", "root", "root");
+        assertThat(sourceConfiguration, not(targetConfiguration));
+

Review comment:
       done

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java
##########
@@ -28,12 +30,11 @@
 /**
  * Database type of H2.
  */
+@EqualsAndHashCode
 public final class H2DatabaseType implements BranchDatabaseType {
     
-    @Override
-    public String getName() {
-        return "H2";
-    }
+    @Getter

Review comment:
       done




----------------------------------------------------------------
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 edited a comment on pull request #6951: Scaling refactor

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #6951:
URL: https://github.com/apache/shardingsphere/pull/6951#issuecomment-677529267


   ## Pull Request Test Coverage Report for [Build 13934](https://coveralls.io/builds/32883514)
   
   * **10** of **16**   **(62.5%)**  changed or added relevant lines in **8** files are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage decreased (**-0.01%**) to **60.28%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/H2DatabaseType.java](https://coveralls.io/builds/32883514/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FH2DatabaseType.java#L33) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/MariaDBDatabaseType.java](https://coveralls.io/builds/32883514/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FMariaDBDatabaseType.java#L33) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/OracleDatabaseType.java](https://coveralls.io/builds/32883514/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FOracleDatabaseType.java#L31) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/PostgreSQLDatabaseType.java](https://coveralls.io/builds/32883514/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FPostgreSQLDatabaseType.java#L31) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/SQL92DatabaseType.java](https://coveralls.io/builds/32883514/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FSQL92DatabaseType.java#L31) | 1 | 2 | 50.0%
   | [shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/type/dialect/SQLServerDatabaseType.java](https://coveralls.io/builds/32883514/source?filename=shardingsphere-infra%2Fshardingsphere-infra-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fdatabase%2Ftype%2Fdialect%2FSQLServerDatabaseType.java#L31) | 1 | 2 | 50.0%
   <!-- | **Total:** | **10** | **16** | **62.5%** | -->
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/32883514/badge)](https://coveralls.io/builds/32883514) |
   | :-- | --: |
   | Change from base [Build 13931](https://coveralls.io/builds/32882550): |  -0.01% |
   | Covered Lines: | 13733 |
   | Relevant Lines: | 22782 |
   
   ---
   ##### 💛  - [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