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/16 14:57:44 UTC

[GitHub] [shardingsphere] yuzel opened a new pull request #6884: add test case for MasterSlaveRuleConfigurationYamlSwapper

yuzel opened a new pull request #6884:
URL: https://github.com/apache/shardingsphere/pull/6884


   Fixes #6878.
   
   Changes proposed in this pull request:
   - add test case.
   -
   -
   


----------------------------------------------------------------
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 #6884: add test case for MasterSlaveRuleConfigurationYamlSwapper

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



##########
File path: shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/test/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleConfigurationYamlSwapperTest.java
##########
@@ -89,4 +102,27 @@ private void assertMasterSlaveRuleConfiguration(final MasterSlaveRuleConfigurati
         assertThat(group.getMasterDataSourceName(), is("master_ds"));
         assertThat(group.getSlaveDataSourceNames(), is(Arrays.asList("slave_ds_0", "slave_ds_1")));
     }
+    
+    @Test
+    public void assertGetTypeClass() {
+        MasterSlaveRuleConfigurationYamlSwapper masterSlaveRuleConfigurationYamlSwapper = getMasterSlaveRuleConfigurationYamlSwapper();
+        Class<MasterSlaveRuleConfiguration> actual = masterSlaveRuleConfigurationYamlSwapper.getTypeClass();
+        assertTrue(actual.isAssignableFrom(MasterSlaveRuleConfiguration.class));
+    }
+    
+    @Test
+    public void assertGetOrder() {
+        MasterSlaveRuleConfigurationYamlSwapper masterSlaveRuleConfigurationYamlSwapper = getMasterSlaveRuleConfigurationYamlSwapper();
+        int actual = masterSlaveRuleConfigurationYamlSwapper.getOrder();
+        assertEquals(MasterSlaveOrder.ORDER, actual);

Review comment:
       Please use assertThat 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.

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



[GitHub] [shardingsphere] coveralls commented on pull request #6884: add test case for MasterSlaveRuleConfigurationYamlSwapper

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


   ## Pull Request Test Coverage Report for [Build 13823](https://coveralls.io/builds/32785460)
   
   * **0** of **0**   changed or added relevant lines in **0** files are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage increased (+**0.009%**) to **58.731%**
   
   ---
   
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/32785460/badge)](https://coveralls.io/builds/32785460) |
   | :-- | --: |
   | Change from base [Build 13822](https://coveralls.io/builds/32785287): |  0.009% |
   | Covered Lines: | 13279 |
   | Relevant Lines: | 22610 |
   
   ---
   ##### 💛  - [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] coveralls edited a comment on pull request #6884: add test case for MasterSlaveRuleConfigurationYamlSwapper

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


   ## Pull Request Test Coverage Report for [Build 13833](https://coveralls.io/builds/32791887)
   
   * **0** of **0**   changed or added relevant lines in **0** files are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage increased (+**0.04%**) to **58.757%**
   
   ---
   
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/32791887/badge)](https://coveralls.io/builds/32791887) |
   | :-- | --: |
   | Change from base [Build 13822](https://coveralls.io/builds/32785287): |  0.04% |
   | Covered Lines: | 13285 |
   | Relevant Lines: | 22610 |
   
   ---
   ##### 💛  - [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 merged pull request #6884: add test case for MasterSlaveRuleConfigurationYamlSwapper

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


   


----------------------------------------------------------------
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] yuzel commented on a change in pull request #6884: add test case for MasterSlaveRuleConfigurationYamlSwapper

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



##########
File path: shardingsphere-features/shardingsphere-master-slave/shardingsphere-master-slave-common/src/test/java/org/apache/shardingsphere/masterslave/yaml/swapper/MasterSlaveRuleConfigurationYamlSwapperTest.java
##########
@@ -89,4 +102,27 @@ private void assertMasterSlaveRuleConfiguration(final MasterSlaveRuleConfigurati
         assertThat(group.getMasterDataSourceName(), is("master_ds"));
         assertThat(group.getSlaveDataSourceNames(), is(Arrays.asList("slave_ds_0", "slave_ds_1")));
     }
+    
+    @Test
+    public void assertGetTypeClass() {
+        MasterSlaveRuleConfigurationYamlSwapper masterSlaveRuleConfigurationYamlSwapper = getMasterSlaveRuleConfigurationYamlSwapper();
+        Class<MasterSlaveRuleConfiguration> actual = masterSlaveRuleConfigurationYamlSwapper.getTypeClass();
+        assertTrue(actual.isAssignableFrom(MasterSlaveRuleConfiguration.class));
+    }
+    
+    @Test
+    public void assertGetOrder() {
+        MasterSlaveRuleConfigurationYamlSwapper masterSlaveRuleConfigurationYamlSwapper = getMasterSlaveRuleConfigurationYamlSwapper();
+        int actual = masterSlaveRuleConfigurationYamlSwapper.getOrder();
+        assertEquals(MasterSlaveOrder.ORDER, actual);

Review comment:
       already edited




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