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/26 08:01:15 UTC

[GitHub] [shardingsphere] huanghao495430759 opened a new pull request #10481: refactor renew AuthorityChangedEvent,add test unit.

huanghao495430759 opened a new pull request #10481:
URL: https://github.com/apache/shardingsphere/pull/10481


   Fixes #10252 .
   
   -refactor renew AuthorityChangedEvent,add test unit.


-- 
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 #10481: refactor renew AuthorityChangedEvent,add test unit.

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10481?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 [#10481](https://codecov.io/gh/apache/shardingsphere/pull/10481?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d7175b) into [master](https://codecov.io/gh/apache/shardingsphere/commit/0d99eab84f31f962593f848e33c88ec1f4b2abe5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d99eab) will **increase** coverage by `0.10%`.
   > The diff coverage is `92.30%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10481/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/10481?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   #10481      +/-   ##
   ============================================
   + Coverage     68.47%   68.57%   +0.10%     
   - Complexity      702      709       +7     
   ============================================
     Files          1758     1765       +7     
     Lines         30019    30133     +114     
     Branches       5376     5393      +17     
   ============================================
   + Hits          20555    20664     +109     
   + Misses         7891     7888       -3     
   - Partials       1573     1581       +8     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10481?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...e/context/metadata/GovernanceMetaDataContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC9tZXRhZGF0YS9Hb3Zlcm5hbmNlTWV0YURhdGFDb250ZXh0cy5qYXZh) | `86.06% <92.30%> (+2.40%)` | :arrow_up: |
   | [...sphere/scaling/core/job/schedule/JobScheduler.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2Ivc2NoZWR1bGUvSm9iU2NoZWR1bGVyLmphdmE=) | `22.22% <0.00%> (-29.63%)` | :arrow_down: |
   | [...re/scaling/core/executor/engine/ExecuteEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9leGVjdXRvci9lbmdpbmUvRXhlY3V0ZUVuZ2luZS5qYXZh) | `88.88% <0.00%> (-11.12%)` | :arrow_down: |
   | [...scaling/core/job/task/inventory/InventoryTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbnZlbnRvcnkvSW52ZW50b3J5VGFzay5qYXZh) | `68.88% <0.00%> (-6.67%)` | :arrow_down: |
   | [...ing/core/job/task/incremental/IncrementalTask.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvdGFzay9pbmNyZW1lbnRhbC9JbmNyZW1lbnRhbFRhc2suamF2YQ==) | `72.91% <0.00%> (-2.09%)` | :arrow_down: |
   | [...dingsphere/distsql/parser/core/DistSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtZGlzdHNxbC1wYXJzZXIvc2hhcmRpbmdzcGhlcmUtZGlzdHNxbC1wYXJzZXItZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kaXN0c3FsL3BhcnNlci9jb3JlL0Rpc3RTUUxWaXNpdG9yLmphdmE=) | `87.17% <0.00%> (-1.71%)` | :arrow_down: |
   | [...caling/mysql/component/MySQLIncrementalDumper.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWRpYWxlY3Qvc2hhcmRpbmdzcGhlcmUtc2NhbGluZy1teXNxbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2NhbGluZy9teXNxbC9jb21wb25lbnQvTXlTUUxJbmNyZW1lbnRhbER1bXBlci5qYXZh) | `75.86% <0.00%> (-0.09%)` | :arrow_down: |
   | [...nder/statement/ddl/AlterTableStatementContext.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc3RhdGVtZW50L2RkbC9BbHRlclRhYmxlU3RhdGVtZW50Q29udGV4dC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [.../sql/common/statement/ddl/AlterTableStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3N0YXRlbWVudC9kZGwvQWx0ZXJUYWJsZVN0YXRlbWVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [.../engine/type/single/SingleTablesRoutingEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctcm91dGUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NoYXJkaW5nL3JvdXRlL2VuZ2luZS90eXBlL3NpbmdsZS9TaW5nbGVUYWJsZXNSb3V0aW5nRW5naW5lLmphdmE=) | `77.27% <0.00%> (ø)` | |
   | ... and [14 more](https://codecov.io/gh/apache/shardingsphere/pull/10481/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/10481?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/10481?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 [0d99eab...0d7175b](https://codecov.io/gh/apache/shardingsphere/pull/10481?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] menghaoranss merged pull request #10481: refactor renew AuthorityChangedEvent,add test unit.

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


   


-- 
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 #10481: refactor renew AuthorityChangedEvent,add test unit.

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/10481?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 [#10481](https://codecov.io/gh/apache/shardingsphere/pull/10481?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (725bd86) into [master](https://codecov.io/gh/apache/shardingsphere/commit/06244047d32a21616c748b38e7fc7af72f6a709d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0624404) will **increase** coverage by `0.00%`.
   > The diff coverage is `80.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/10481/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/10481?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   #10481   +/-   ##
   =========================================
     Coverage     68.66%   68.67%           
     Complexity      723      723           
   =========================================
     Files          1776     1776           
     Lines         30395    30414   +19     
     Branches       5443     5447    +4     
   =========================================
   + Hits          20870    20886   +16     
   - Misses         7913     7914    +1     
   - Partials       1612     1614    +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/10481?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...e/context/metadata/GovernanceMetaDataContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC9tZXRhZGF0YS9Hb3Zlcm5hbmNlTWV0YURhdGFDb250ZXh0cy5qYXZh) | `80.83% <80.00%> (+1.75%)` | :arrow_up: |
   | [...r/jdbc/core/statement/ShardingSphereStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtamRiYy9zaGFyZGluZ3NwaGVyZS1qZGJjLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RyaXZlci9qZGJjL2NvcmUvc3RhdGVtZW50L1NoYXJkaW5nU3BoZXJlU3RhdGVtZW50LmphdmE=) | `59.17% <0.00%> (-0.19%)` | :arrow_down: |
   | [...ore/statement/ShardingSpherePreparedStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtamRiYy9zaGFyZGluZ3NwaGVyZS1qZGJjLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RyaXZlci9qZGJjL2NvcmUvc3RhdGVtZW50L1NoYXJkaW5nU3BoZXJlUHJlcGFyZWRTdGF0ZW1lbnQuamF2YQ==) | `74.50% <0.00%> (-0.13%)` | :arrow_down: |
   | [...ra/config/properties/ConfigurationPropertyKey.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9jb25maWcvcHJvcGVydGllcy9Db25maWd1cmF0aW9uUHJvcGVydHlLZXkuamF2YQ==) | `100.00% <0.00%> (ø)` | |
   | [...fra/executor/sql/process/ExecuteProcessEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtZXhlY3V0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2luZnJhL2V4ZWN1dG9yL3NxbC9wcm9jZXNzL0V4ZWN1dGVQcm9jZXNzRW5naW5lLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...a/executor/sql/execute/engine/raw/RawExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtZXhlY3V0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2luZnJhL2V4ZWN1dG9yL3NxbC9leGVjdXRlL2VuZ2luZS9yYXcvUmF3RXhlY3V0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...or/sql/optimize/schema/row/CalciteRowExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtZXhlY3V0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2luZnJhL2V4ZWN1dG9yL3NxbC9vcHRpbWl6ZS9zY2hlbWEvcm93L0NhbGNpdGVSb3dFeGVjdXRvci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...r/sql/process/ExecuteProcessStrategyEvaluator.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtZXhlY3V0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2luZnJhL2V4ZWN1dG9yL3NxbC9wcm9jZXNzL0V4ZWN1dGVQcm9jZXNzU3RyYXRlZ3lFdmFsdWF0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...communication/jdbc/executor/ProxyJDBCExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9jb21tdW5pY2F0aW9uL2pkYmMvZXhlY3V0b3IvUHJveHlKREJDRXhlY3V0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...e/job/preparer/splitter/InventoryTaskSplitter.java](https://codecov.io/gh/apache/shardingsphere/pull/10481/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-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9qb2IvcHJlcGFyZXIvc3BsaXR0ZXIvSW52ZW50b3J5VGFza1NwbGl0dGVyLmphdmE=) | `90.00% <0.00%> (+0.25%)` | :arrow_up: |
   | ... and [1 more](https://codecov.io/gh/apache/shardingsphere/pull/10481/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/10481?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/10481?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 [0624404...725bd86](https://codecov.io/gh/apache/shardingsphere/pull/10481?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] menghaoranss commented on a change in pull request #10481: refactor renew AuthorityChangedEvent,add test unit.

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



##########
File path: shardingsphere-governance/shardingsphere-governance-context/src/test/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContextsTest.java
##########
@@ -216,10 +217,27 @@ public void assertGlobalRuleConfigurationsChanged() {
     }
 
     private Collection<RuleConfiguration> getChangedGlobalRuleConfigurations() {
+        RuleConfiguration authorityRuleConfig = new AuthorityRuleConfiguration(getShardingSphereUsers(), new ShardingSphereAlgorithmConfiguration("NATIVE", new Properties()));
+        return Collections.singleton(authorityRuleConfig);
+    }
+    
+    private Collection<ShardingSphereUser> getShardingSphereUsers() {
         Collection<ShardingSphereUser> users = new LinkedList<>();

Review comment:
       users -> result

##########
File path: shardingsphere-governance/shardingsphere-governance-context/src/test/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContextsTest.java
##########
@@ -92,15 +93,15 @@
     
     private GovernanceMetaDataContexts governanceMetaDataContexts;
     
-    @Mock
+    @Mock(answer = Answers.RETURNS_DEEP_STUBS)

Review comment:
       does this option work?

##########
File path: shardingsphere-governance/shardingsphere-governance-context/src/main/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContexts.java
##########
@@ -418,5 +422,29 @@ private boolean isModifiedDataSource(final Map<String, DataSource> oldDataSource
         return result;
     }
     
+    private ShardingSphereRuleMetaData getChangedGlobalRuleMetaData(final AuthorityChangedEvent event) {
+        Optional<AuthorityRuleConfiguration> authorityRuleConfig = metaDataContexts.getGlobalRuleMetaData().getConfigurations().stream().filter(each -> each instanceof AuthorityRuleConfiguration)
+                .findAny().map(each -> (AuthorityRuleConfiguration) each);
+        Collection<RuleConfiguration> globalRuleConfigs = new LinkedList<>(metaDataContexts.getGlobalRuleMetaData().getConfigurations());
+        globalRuleConfigs.remove(authorityRuleConfig.get());

Review comment:
       I‘m not sure authorityRuleConfig needs to be confirmed isPresent




-- 
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] menghaoranss commented on a change in pull request #10481: refactor renew AuthorityChangedEvent,add test unit.

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



##########
File path: shardingsphere-governance/shardingsphere-governance-context/src/main/java/org/apache/shardingsphere/governance/context/metadata/GovernanceMetaDataContexts.java
##########
@@ -418,5 +422,29 @@ private boolean isModifiedDataSource(final Map<String, DataSource> oldDataSource
         return result;
     }
     
+    private ShardingSphereRuleMetaData getChangedGlobalRuleMetaData(final AuthorityChangedEvent event) {
+        Optional<AuthorityRuleConfiguration> authorityRuleConfig = metaDataContexts.getGlobalRuleMetaData().getConfigurations().stream().filter(each -> each instanceof AuthorityRuleConfiguration)
+                .findAny().map(each -> (AuthorityRuleConfiguration) each);
+        Collection<RuleConfiguration> globalRuleConfigs = new LinkedList<>(metaDataContexts.getGlobalRuleMetaData().getConfigurations());
+        globalRuleConfigs.remove(authorityRuleConfig.get());

Review comment:
       I‘m not sure if authorityRuleConfig needs to be confirmed isPresent




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