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/05/16 14:18:49 UTC

[GitHub] [shardingsphere] JooKS-me opened a new pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

JooKS-me opened a new pull request #10355:
URL: https://github.com/apache/shardingsphere/pull/10355


   Fixes #10345.
   
   


-- 
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] JooKS-me commented on a change in pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

Posted by GitBox <gi...@apache.org>.
JooKS-me commented on a change in pull request #10355:
URL: https://github.com/apache/shardingsphere/pull/10355#discussion_r633280527



##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       @SteNicholas Hi, do you mean to check the attribute values of `registryCenterRepository` one by one? I have some confusion because I think it has no attribute values.
   
   In this test code, `governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));` will generate a `RegistryCenterRepositoryFixture` class instance through the SPI mechanism, but we know that `RegistryCenterRepositoryFixture` does not have any Attributes, except for the `PATH_SEPARATOR` defined in the interface `RegistryCenterRepository`.
   
   However, I can check the attributes of `listenerManager` one by one.
   
   Is it right ?




-- 
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] JooKS-me commented on a change in pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

Posted by GitBox <gi...@apache.org>.
JooKS-me commented on a change in pull request #10355:
URL: https://github.com/apache/shardingsphere/pull/10355#discussion_r633280527



##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       @SteNicholas Hi, do you mean to check the attribute values of `registryCenterRepository` one by one? I have some confusion because I think it has no attribute values.
   
   In this test code, `governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));` will generate a `RegistryCenterRepositoryFixture` class instance through the SPI mechanism, but we know that `RegistryCenterRepositoryFixture` does not have any Attributes, except for the `PATH_SEPARATOR` defined in the interface `RegistryCenterRepository`.
   
   However, I can check the attributes of `listenerManager` one by one.
   
   Is it right ?




-- 
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] SteNicholas commented on a change in pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

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



##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));

Review comment:
       IMO, this should add validation for the field type of `isOverwrite`, which verify whether `isOverwrite ` is boolean type and then convert to `Boolean` type object.

##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       This could validate the field value of `registryCenterRepository`, not only verify whether the field value is not null.




-- 
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 #10355: Add more assertions of GovernanceFacadeTest.assertInit()

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


   


-- 
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] SteNicholas commented on pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

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


   @terrymanu , please help to take a look for this pull request. I have approved the changes.


-- 
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] codecov-commenter edited a comment on pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #10355:
URL: https://github.com/apache/shardingsphere/pull/10355#issuecomment-841828208


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10355?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 [#10355](https://codecov.io/gh/apache/shardingsphere/pull/10355?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3e2402d) into [master](https://codecov.io/gh/apache/shardingsphere/commit/ea2f7a390a811c9d0f96648d232bd897036a55be?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ea2f7a3) will **increase** coverage by `0.38%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10355/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/10355?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   #10355      +/-   ##
   ============================================
   + Coverage     68.60%   68.98%   +0.38%     
     Complexity      691      691              
   ============================================
     Files          1727     1727              
     Lines         29438    29374      -64     
     Branches       5293     5280      -13     
   ============================================
   + Hits          20197    20265      +68     
   + Misses         7677     7544     -133     
   - Partials       1564     1565       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10355?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...sphere/scaling/core/util/JobConfigurationUtil.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS91dGlsL0pvYkNvbmZpZ3VyYXRpb25VdGlsLmphdmE=) | `71.18% <0.00%> (-0.41%)` | `46.00% <0.00%> (ø%)` | |
   | [...ontext/authority/listener/UserChangedListener.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC9hdXRob3JpdHkvbGlzdGVuZXIvVXNlckNoYW5nZWRMaXN0ZW5lci5qYXZh) | `100.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...rce/ShardingSphereJDBCDataSourceConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9jb25maWcvZGF0YXNvdXJjZS9TaGFyZGluZ1NwaGVyZUpEQkNEYXRhU291cmNlQ29uZmlndXJhdGlvbi5qYXZh) | `100.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...thority/listener/PrivilegeNodeChangedListener.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC9hdXRob3JpdHkvbGlzdGVuZXIvUHJpdmlsZWdlTm9kZUNoYW5nZWRMaXN0ZW5lci5qYXZh) | `100.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...pl/CreateReadwriteSplittingRuleBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmRsL2ltcGwvQ3JlYXRlUmVhZHdyaXRlU3BsaXR0aW5nUnVsZUJhY2tlbmRIYW5kbGVyLmphdmE=) | `96.42% <0.00%> (ø)` | `1.00% <0.00%> (ø%)` | |
   | [...e/core/yaml/config/YamlConfigurationConverter.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS95YW1sL2NvbmZpZy9ZYW1sQ29uZmlndXJhdGlvbkNvbnZlcnRlci5qYXZh) | | | |
   | [...ml/swapper/GovernanceConfigurationYamlSwapper.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS95YW1sL3N3YXBwZXIvR292ZXJuYW5jZUNvbmZpZ3VyYXRpb25ZYW1sU3dhcHBlci5qYXZh) | | | |
   | [...reateReadwriteSplittingRuleStatementConverter.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy9zaGFyZGluZ3NwaGVyZS1yZWFkd3JpdGUtc3BsaXR0aW5nLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcmVhZHdyaXRlc3BsaXR0aW5nL2NvbW1vbi95YW1sL2NvbnZlcnRlci9DcmVhdGVSZWFkd3JpdGVTcGxpdHRpbmdSdWxlU3RhdGVtZW50Q29udmVydGVyLmphdmE=) | | | |
   | [...AlterReadwriteSplittingRuleStatementConverter.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy9zaGFyZGluZ3NwaGVyZS1yZWFkd3JpdGUtc3BsaXR0aW5nLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcmVhZHdyaXRlc3BsaXR0aW5nL2NvbW1vbi95YW1sL2NvbnZlcnRlci9BbHRlclJlYWR3cml0ZVNwbGl0dGluZ1J1bGVTdGF0ZW1lbnRDb252ZXJ0ZXIuamF2YQ==) | | | |
   | [...overnance/core/yaml/swapper/SchemaYamlSwapper.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS95YW1sL3N3YXBwZXIvU2NoZW1hWWFtbFN3YXBwZXIuamF2YQ==) | | | |
   | ... and [32 more](https://codecov.io/gh/apache/shardingsphere/pull/10355/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/10355?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/10355?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 [ea2f7a3...3e2402d](https://codecov.io/gh/apache/shardingsphere/pull/10355?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.

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



[GitHub] [shardingsphere] codecov-commenter edited a comment on pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #10355:
URL: https://github.com/apache/shardingsphere/pull/10355#issuecomment-841828208


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10355?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 [#10355](https://codecov.io/gh/apache/shardingsphere/pull/10355?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3e2402d) into [master](https://codecov.io/gh/apache/shardingsphere/commit/ea2f7a390a811c9d0f96648d232bd897036a55be?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ea2f7a3) will **increase** coverage by `0.38%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10355/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/10355?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   #10355      +/-   ##
   ============================================
   + Coverage     68.60%   68.98%   +0.38%     
     Complexity      691      691              
   ============================================
     Files          1727     1727              
     Lines         29438    29374      -64     
     Branches       5293     5280      -13     
   ============================================
   + Hits          20197    20265      +68     
   + Misses         7677     7544     -133     
   - Partials       1564     1565       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10355?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...sphere/scaling/core/util/JobConfigurationUtil.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS91dGlsL0pvYkNvbmZpZ3VyYXRpb25VdGlsLmphdmE=) | `71.18% <0.00%> (-0.41%)` | `46.00% <0.00%> (ø%)` | |
   | [...ontext/authority/listener/UserChangedListener.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC9hdXRob3JpdHkvbGlzdGVuZXIvVXNlckNoYW5nZWRMaXN0ZW5lci5qYXZh) | `100.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...rce/ShardingSphereJDBCDataSourceConfiguration.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9jb25maWcvZGF0YXNvdXJjZS9TaGFyZGluZ1NwaGVyZUpEQkNEYXRhU291cmNlQ29uZmlndXJhdGlvbi5qYXZh) | `100.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...thority/listener/PrivilegeNodeChangedListener.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC9hdXRob3JpdHkvbGlzdGVuZXIvUHJpdmlsZWdlTm9kZUNoYW5nZWRMaXN0ZW5lci5qYXZh) | `100.00% <0.00%> (ø)` | `0.00% <0.00%> (ø%)` | |
   | [...pl/CreateReadwriteSplittingRuleBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmRsL2ltcGwvQ3JlYXRlUmVhZHdyaXRlU3BsaXR0aW5nUnVsZUJhY2tlbmRIYW5kbGVyLmphdmE=) | `96.42% <0.00%> (ø)` | `1.00% <0.00%> (ø%)` | |
   | [...e/core/yaml/config/YamlConfigurationConverter.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS95YW1sL2NvbmZpZy9ZYW1sQ29uZmlndXJhdGlvbkNvbnZlcnRlci5qYXZh) | | | |
   | [...ml/swapper/GovernanceConfigurationYamlSwapper.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS95YW1sL3N3YXBwZXIvR292ZXJuYW5jZUNvbmZpZ3VyYXRpb25ZYW1sU3dhcHBlci5qYXZh) | | | |
   | [...reateReadwriteSplittingRuleStatementConverter.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy9zaGFyZGluZ3NwaGVyZS1yZWFkd3JpdGUtc3BsaXR0aW5nLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcmVhZHdyaXRlc3BsaXR0aW5nL2NvbW1vbi95YW1sL2NvbnZlcnRlci9DcmVhdGVSZWFkd3JpdGVTcGxpdHRpbmdSdWxlU3RhdGVtZW50Q29udmVydGVyLmphdmE=) | | | |
   | [...AlterReadwriteSplittingRuleStatementConverter.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy9zaGFyZGluZ3NwaGVyZS1yZWFkd3JpdGUtc3BsaXR0aW5nLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcmVhZHdyaXRlc3BsaXR0aW5nL2NvbW1vbi95YW1sL2NvbnZlcnRlci9BbHRlclJlYWR3cml0ZVNwbGl0dGluZ1J1bGVTdGF0ZW1lbnRDb252ZXJ0ZXIuamF2YQ==) | | | |
   | [...overnance/core/yaml/swapper/SchemaYamlSwapper.java](https://codecov.io/gh/apache/shardingsphere/pull/10355/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29yZS95YW1sL3N3YXBwZXIvU2NoZW1hWWFtbFN3YXBwZXIuamF2YQ==) | | | |
   | ... and [32 more](https://codecov.io/gh/apache/shardingsphere/pull/10355/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/10355?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/10355?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 [ea2f7a3...3e2402d](https://codecov.io/gh/apache/shardingsphere/pull/10355?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.

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



[GitHub] [shardingsphere] JooKS-me commented on a change in pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

Posted by GitBox <gi...@apache.org>.
JooKS-me commented on a change in pull request #10355:
URL: https://github.com/apache/shardingsphere/pull/10355#discussion_r633212552



##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       OK, I will add 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] JooKS-me commented on a change in pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

Posted by GitBox <gi...@apache.org>.
JooKS-me commented on a change in pull request #10355:
URL: https://github.com/apache/shardingsphere/pull/10355#discussion_r633270893



##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       @SteNicholas Hi, do you mean to check the attribute values of `registryCenterRepository` one by one? I have some confusion because I think it has no attribute values.
   
   In this test code, `governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));` will generate a `RegistryCenterRepositoryFixture` class instance through the SPI mechanism, but we know that `RegistryCenterRepositoryFixture` does not have any Attributes, except for the `PATH_SEPARATOR` defined in the interface `RegistryCenterRepository`.
   
   However, I can check the attributes of `listenerManager` one by one~
   
   Is it right ?




-- 
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] JooKS-me commented on a change in pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

Posted by GitBox <gi...@apache.org>.
JooKS-me commented on a change in pull request #10355:
URL: https://github.com/apache/shardingsphere/pull/10355#discussion_r633212552



##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       OK, I will add it.

##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       @SteNicholas Hi, do you mean to check the attribute values of `registryCenterRepository` one by one? I have some confusion because I think it has no attribute values.
   
   In this test code, `governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));` will generate a `RegistryCenterRepositoryFixture` class instance through the SPI mechanism, but we know that `RegistryCenterRepositoryFixture` does not have any Attributes, except for the `PATH_SEPARATOR` defined in the interface `RegistryCenterRepository`.
   
   However, I can check the attributes of `listenerManager` one by one~
   
   Is it right ?

##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       @SteNicholas Hi, do you mean to check the attribute values of `registryCenterRepository` one by one? I have some confusion because I think it has no attribute values.
   
   In this test code, `governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));` will generate a `RegistryCenterRepositoryFixture` class instance through the SPI mechanism, but we know that `RegistryCenterRepositoryFixture` does not have any Attributes, except for the `PATH_SEPARATOR` defined in the interface `RegistryCenterRepository`.
   
   However, I can check the attributes of `listenerManager` one by one.
   
   Is it right ?

##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       @SteNicholas Hi, do you mean to check the attribute values of `registryCenterRepository` one by one? I have some confusion because I think it has no attribute values.
   
   In this test code, `governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));` will generate a `RegistryCenterRepositoryFixture` class instance through the SPI mechanism, but we know that `RegistryCenterRepositoryFixture` does not have any Attributes, except for the `PATH_SEPARATOR` defined in the interface `RegistryCenterRepository`.
   
   However, I can check the attributes of `listenerManager` one by one.
   
   Is it right ?




-- 
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] codecov-commenter commented on pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10355?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 [#10355](https://codecov.io/gh/apache/shardingsphere/pull/10355?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b181296) into [master](https://codecov.io/gh/apache/shardingsphere/commit/ea2f7a390a811c9d0f96648d232bd897036a55be?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ea2f7a3) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10355/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/10355?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   #10355   +/-   ##
   =========================================
     Coverage     68.60%   68.60%           
     Complexity      691      691           
   =========================================
     Files          1727     1727           
     Lines         29438    29438           
     Branches       5293     5293           
   =========================================
     Hits          20197    20197           
     Misses         7677     7677           
     Partials       1564     1564           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10355?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/10355?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 [ea2f7a3...b181296](https://codecov.io/gh/apache/shardingsphere/pull/10355?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.

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



[GitHub] [shardingsphere] codecov-commenter commented on pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10355?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 [#10355](https://codecov.io/gh/apache/shardingsphere/pull/10355?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b181296) into [master](https://codecov.io/gh/apache/shardingsphere/commit/ea2f7a390a811c9d0f96648d232bd897036a55be?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ea2f7a3) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10355/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/10355?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   #10355   +/-   ##
   =========================================
     Coverage     68.60%   68.60%           
     Complexity      691      691           
   =========================================
     Files          1727     1727           
     Lines         29438    29438           
     Branches       5293     5293           
   =========================================
     Hits          20197    20197           
     Misses         7677     7677           
     Partials       1564     1564           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10355?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/10355?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 [ea2f7a3...b181296](https://codecov.io/gh/apache/shardingsphere/pull/10355?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.

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



[GitHub] [shardingsphere] SteNicholas commented on a change in pull request #10355: Add more assertions of GovernanceFacadeTest.assertInit()

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



##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));

Review comment:
       IMO, this should add validation for the field type of `isOverwrite`, which verify whether `isOverwrite ` is boolean type and then convert to `Boolean` type object.

##########
File path: shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/facade/GovernanceFacadeTest.java
##########
@@ -47,7 +48,9 @@ public void assertInit() {
         GovernanceConfiguration config = new GovernanceConfiguration("test_name", new RegistryCenterConfiguration("TEST", "127.0.0.1", new Properties()), false);
         governanceFacade.init(config, Arrays.asList("schema_0", "schema_1"));
         assertNotNull(governanceFacade.getRegistryCenter());
-        // TODO use reflection to assert attributes of GovernanceFacade
+        assertFalse((Boolean) getField(governanceFacade, "isOverwrite"));
+        assertNotNull(getField(governanceFacade, "registryCenterRepository"));

Review comment:
       This could validate the field value of `registryCenterRepository`, not only verify whether the field value is not null.




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