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 2021/09/23 01:09:59 UTC

[GitHub] [shardingsphere] fwhdzh opened a new pull request #12635: Add unit test of StandaloneContextManagerBuilderText

fwhdzh opened a new pull request #12635:
URL: https://github.com/apache/shardingsphere/pull/12635


   For #ISSUSE_ID.
   
   Changes proposed in this pull request:
   - Add unit test of StandaloneContextManagerBuilderText.
   


-- 
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 #12635: Add unit test of StandaloneContextManagerBuilderText

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/12635?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 [#12635](https://codecov.io/gh/apache/shardingsphere/pull/12635?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0f33af7) into [master](https://codecov.io/gh/apache/shardingsphere/commit/ed1bdff13175365adbdc6e2c02305b241e2f5d50?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ed1bdff) will **increase** coverage by `0.16%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/12635/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/12635?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   #12635      +/-   ##
   ============================================
   + Coverage     63.38%   63.54%   +0.16%     
   - Complexity     1328     1329       +1     
   ============================================
     Files          2439     2439              
     Lines         37046    37046              
     Branches       6401     6401              
   ============================================
   + Hits          23480    23541      +61     
   + Misses        11673    11603      -70     
   - Partials       1893     1902       +9     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/12635?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/12635/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: |
   | [...er/standalone/StandaloneContextManagerBuilder.java](https://codecov.io/gh/apache/shardingsphere/pull/12635/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-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLXR5cGUvc2hhcmRpbmdzcGhlcmUtc3RhbmRhbG9uZS1tb2RlL3NoYXJkaW5nc3BoZXJlLXN0YW5kYWxvbmUtbW9kZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9tb2RlL21hbmFnZXIvc3RhbmRhbG9uZS9TdGFuZGFsb25lQ29udGV4dE1hbmFnZXJCdWlsZGVyLmphdmE=) | `74.35% <0.00%> (+74.35%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/12635?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/12635?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 [ed1bdff...0f33af7](https://codecov.io/gh/apache/shardingsphere/pull/12635?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] strongduanmu commented on a change in pull request #12635: Add unit test of StandaloneContextManagerBuilderText

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



##########
File path: shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/StandaloneContextManagerBuilderTextTest.java
##########
@@ -0,0 +1,99 @@
+/*
+ * 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.mode.manager.standalone;
+
+import org.apache.shardingsphere.infra.config.RuleConfiguration;
+import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
+import org.apache.shardingsphere.mode.manager.ContextManager;
+import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
+import org.apache.shardingsphere.mode.metadata.persist.node.GlobalNode;
+import org.apache.shardingsphere.mode.metadata.persist.node.SchemaMetaDataNode;
+import org.apache.shardingsphere.mode.persist.PersistRepository;
+import org.apache.shardingsphere.transaction.context.TransactionContexts;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public final class StandaloneContextManagerBuilderTextTest {
+
+    public static final String TEST_DATA_SOURCE_INNER_MAP = "TEST_DATA_SOURCE_INNER_MAP";
+
+    public static final String TEST_CONNECTION_URL = "jdbc:mysql://testhost:3306/testdatabase";
+
+    @Test
+    public void assertBuild() throws SQLException {
+        Map<String, Map<String, DataSource>> dataSourceMap = getDataSourceMap();
+        Map<String, Collection<RuleConfiguration>> schemaRuleConfigs = getSchemaRuleConfigs();
+        Collection<RuleConfiguration> globalRuleConfigurationCollection = getGlobalRuleConfigurationCollection();
+        final Properties props = new Properties();

Review comment:
       @fwhdzh Please remove this useless final modifier.




-- 
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] fwhdzh commented on pull request #12635: Add unit test of StandaloneContextManagerBuilderText

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


   > @fwhdzh Can you fix ci error first?
   
   Ok, I will fix it soon.


-- 
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] strongduanmu commented on a change in pull request #12635: Add unit test of StandaloneContextManagerBuilderText

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



##########
File path: shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/StandaloneContextManagerBuilderTextTest.java
##########
@@ -0,0 +1,99 @@
+/*
+ * 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.mode.manager.standalone;
+
+import org.apache.shardingsphere.infra.config.RuleConfiguration;
+import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
+import org.apache.shardingsphere.mode.manager.ContextManager;
+import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
+import org.apache.shardingsphere.mode.metadata.persist.node.GlobalNode;
+import org.apache.shardingsphere.mode.metadata.persist.node.SchemaMetaDataNode;
+import org.apache.shardingsphere.mode.persist.PersistRepository;
+import org.apache.shardingsphere.transaction.context.TransactionContexts;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public final class StandaloneContextManagerBuilderTextTest {
+
+    public static final String TEST_DATA_SOURCE_INNER_MAP = "TEST_DATA_SOURCE_INNER_MAP";
+
+    public static final String TEST_CONNECTION_URL = "jdbc:mysql://testhost:3306/testdatabase";
+
+    @Test
+    public void assertBuild() throws SQLException {
+        Map<String, Map<String, DataSource>> dataSourceMap = getDataSourceMap();
+        Map<String, Collection<RuleConfiguration>> schemaRuleConfigs = getSchemaRuleConfigs();
+        Collection<RuleConfiguration> globalRuleConfigurationCollection = getGlobalRuleConfigurationCollection();
+        final Properties props = new Properties();

Review comment:
       @fwhdzh Please remove this useless final modifier.

##########
File path: shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/StandaloneContextManagerBuilderTextTest.java
##########
@@ -0,0 +1,99 @@
+/*
+ * 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.mode.manager.standalone;
+
+import org.apache.shardingsphere.infra.config.RuleConfiguration;
+import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
+import org.apache.shardingsphere.mode.manager.ContextManager;
+import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
+import org.apache.shardingsphere.mode.metadata.persist.node.GlobalNode;
+import org.apache.shardingsphere.mode.metadata.persist.node.SchemaMetaDataNode;
+import org.apache.shardingsphere.mode.persist.PersistRepository;
+import org.apache.shardingsphere.transaction.context.TransactionContexts;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public final class StandaloneContextManagerBuilderTextTest {
+
+    public static final String TEST_DATA_SOURCE_INNER_MAP = "TEST_DATA_SOURCE_INNER_MAP";
+
+    public static final String TEST_CONNECTION_URL = "jdbc:mysql://testhost:3306/testdatabase";
+
+    @Test
+    public void assertBuild() throws SQLException {
+        Map<String, Map<String, DataSource>> dataSourceMap = getDataSourceMap();
+        Map<String, Collection<RuleConfiguration>> schemaRuleConfigs = getSchemaRuleConfigs();
+        Collection<RuleConfiguration> globalRuleConfigurationCollection = getGlobalRuleConfigurationCollection();
+        final Properties props = new Properties();
+        ModeConfiguration modeConfiguration = new ModeConfiguration("testType", null, false);
+        StandaloneContextManagerBuilder standaloneContextManagerBuilder = new StandaloneContextManagerBuilder();
+        ContextManager actual = standaloneContextManagerBuilder.build(modeConfiguration, dataSourceMap, schemaRuleConfigs, globalRuleConfigurationCollection, props, false, 1000);
+        MetaDataContexts metaDataContexts = actual.getMetaDataContexts();
+        assertNotNull(metaDataContexts.getMetaDataMap().get(TEST_DATA_SOURCE_INNER_MAP));
+        assertNotNull(metaDataContexts.getExecutorEngine());
+        PersistRepository resultRepository = metaDataContexts.getMetaDataPersistService().get().getRepository();
+        assertNotNull(resultRepository.get(GlobalNode.getGlobalRuleNode()));
+        assertNotNull(resultRepository.get(SchemaMetaDataNode.getMetaDataDataSourcePath(TEST_DATA_SOURCE_INNER_MAP)));
+        assertNotNull(resultRepository.get(SchemaMetaDataNode.getRulePath(TEST_DATA_SOURCE_INNER_MAP)));
+        TransactionContexts transactionContexts = actual.getTransactionContexts();
+        assertNotNull(transactionContexts.getEngines());
+        assertNotNull(transactionContexts.getEngines().get(TEST_DATA_SOURCE_INNER_MAP));
+    }
+
+    private Map<String, Map<String, DataSource>> getDataSourceMap() throws SQLException {
+        Connection connection = mock(Connection.class, RETURNS_DEEP_STUBS);
+        when(connection.getMetaData().getURL()).thenReturn(TEST_CONNECTION_URL);
+        DataSource dataSource = mock(DataSource.class, RETURNS_DEEP_STUBS);
+        when(dataSource.getConnection()).thenReturn(connection);
+        Map<String, DataSource> dataSourceInnerMap = new HashMap<>();
+        dataSourceInnerMap.put("testDataSource", dataSource);
+        Map<String, Map<String, DataSource>> result = new HashMap<>();
+        result.put(TEST_DATA_SOURCE_INNER_MAP, dataSourceInnerMap);
+        return result;
+    }
+
+    private Map<String, Collection<RuleConfiguration>> getSchemaRuleConfigs() {
+        RuleConfiguration ruleConfiguration = mock(RuleConfiguration.class);
+        Collection<RuleConfiguration> ruleConfigurationCollection = new LinkedList<>();
+        ruleConfigurationCollection.add(ruleConfiguration);
+        Map<String, Collection<RuleConfiguration>> result = new HashMap<>();
+        result.put(TEST_DATA_SOURCE_INNER_MAP, ruleConfigurationCollection);
+        return result;
+    }
+
+    private Collection<RuleConfiguration> getGlobalRuleConfigurationCollection() {
+        RuleConfiguration globalRuleConfiguration = mock(RuleConfiguration.class);
+        Collection<RuleConfiguration> globalRuleConfigurationCollection = new HashSet<>();
+        globalRuleConfigurationCollection.add(globalRuleConfiguration);
+        return globalRuleConfigurationCollection;

Review comment:
       @fwhdzh Maybe `result` is better.

##########
File path: shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/fixture/StandalonePersistRepositoryFixture.java
##########
@@ -0,0 +1,69 @@
+/*
+ * 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.mode.manager.standalone.fixture;
+
+import org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepository;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+public final class StandalonePersistRepositoryFixture implements StandalonePersistRepository {
+
+    private Map<String, String> persistMap = new HashMap<>();
+
+    @Override
+    public String get(final String key) {
+        return persistMap.get(key);
+    }
+
+    @Override
+    public List<String> getChildrenKeys(final String key) {
+        List<String> result = new LinkedList<>();
+        for (String each: persistMap.keySet()) {
+            if (each.startsWith(key)) {
+                String child = each.substring(key.length() + 1, each.indexOf('/', key.length() + 1));
+                if (!result.contains(child)) {
+                    result.add(child);
+                }
+            }
+        }
+        return result;
+    }
+
+    @Override
+    public void persist(final String key, final String value) {
+        persistMap.put(key, value);
+    }
+
+    @Override
+    public void delete(final String key) {
+

Review comment:
       @fwhdzh Please remove useless blank line.

##########
File path: shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-core/src/test/java/org/apache/shardingsphere/mode/manager/standalone/StandaloneContextManagerBuilderTextTest.java
##########
@@ -0,0 +1,99 @@
+/*
+ * 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.mode.manager.standalone;
+
+import org.apache.shardingsphere.infra.config.RuleConfiguration;
+import org.apache.shardingsphere.infra.config.mode.ModeConfiguration;
+import org.apache.shardingsphere.mode.manager.ContextManager;
+import org.apache.shardingsphere.mode.metadata.MetaDataContexts;
+import org.apache.shardingsphere.mode.metadata.persist.node.GlobalNode;
+import org.apache.shardingsphere.mode.metadata.persist.node.SchemaMetaDataNode;
+import org.apache.shardingsphere.mode.persist.PersistRepository;
+import org.apache.shardingsphere.transaction.context.TransactionContexts;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public final class StandaloneContextManagerBuilderTextTest {
+
+    public static final String TEST_DATA_SOURCE_INNER_MAP = "TEST_DATA_SOURCE_INNER_MAP";
+
+    public static final String TEST_CONNECTION_URL = "jdbc:mysql://testhost:3306/testdatabase";
+
+    @Test
+    public void assertBuild() throws SQLException {
+        Map<String, Map<String, DataSource>> dataSourceMap = getDataSourceMap();
+        Map<String, Collection<RuleConfiguration>> schemaRuleConfigs = getSchemaRuleConfigs();
+        Collection<RuleConfiguration> globalRuleConfigurationCollection = getGlobalRuleConfigurationCollection();
+        final Properties props = new Properties();

Review comment:
       @fwhdzh Please remove this useless final modifier.




-- 
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] strongduanmu merged pull request #12635: Add unit test of StandaloneContextManagerBuilderText

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


   


-- 
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] strongduanmu commented on pull request #12635: Add unit test of StandaloneContextManagerBuilderText

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


   @fwhdzh Can you fix ci error first?


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