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/06/07 13:07:36 UTC

[GitHub] [shardingsphere-elasticjob] y553546436 opened a new pull request #1901: Remove state pollution caused by test GsonFactoryTest.assertRegisterTypeAdapter to avoid order-dependent flaky tests

y553546436 opened a new pull request #1901:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1901


   Fixes #1900.
   
   Changes proposed in this pull request:
   - Remove the `final` keyword for the `GsonBuilder` field in `GsonFactory` class.
   - Add `clean` method in `GsonFactory` class, which re-initializes the `GsonBuilder`.
   - Invoke the `clean` method in `GsonFactory` when the test `GsonFactoryTest.assertRegisterTypeAdapter` finishes.
   
   With the proposed fix, the test does not pollute the shared state (and passes when run twice in the same JVM).
   
   Note: this PR is a follow-up of #1774.


-- 
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-elasticjob] Technoboy- commented on pull request #1901: Remove state pollution caused by test GsonFactoryTest.assertRegisterTypeAdapter to avoid order-dependent flaky tests

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on pull request #1901:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1901#issuecomment-873503834


   @y553546436 Nice catch. 


-- 
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-elasticjob] TeslaCN merged pull request #1901: Remove state pollution caused by test GsonFactoryTest.assertRegisterTypeAdapter to avoid order-dependent flaky tests

Posted by GitBox <gi...@apache.org>.
TeslaCN merged pull request #1901:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1901


   


-- 
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-elasticjob] TeslaCN merged pull request #1901: Remove state pollution caused by test GsonFactoryTest.assertRegisterTypeAdapter to avoid order-dependent flaky tests

Posted by GitBox <gi...@apache.org>.
TeslaCN merged pull request #1901:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1901


   


-- 
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-elasticjob] Technoboy- commented on pull request #1901: Remove state pollution caused by test GsonFactoryTest.assertRegisterTypeAdapter to avoid order-dependent flaky tests

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on pull request #1901:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1901#issuecomment-873503865


   @TeslaCN 


-- 
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-elasticjob] codecov-commenter commented on pull request #1901: Remove state pollution caused by test GsonFactoryTest.assertRegisterTypeAdapter to avoid order-dependent flaky tests

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?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 [#1901](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ffef073) into [master](https://codecov.io/gh/apache/shardingsphere-elasticjob/commit/b0a1d8784efcccfe00d0c5035c9ab0997b46e09d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b0a1d87) will **decrease** coverage by `0.02%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/graphs/tree.svg?width=650&height=150&src=pr&token=8ZMVc4Yo4Z&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-elasticjob/pull/1901?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    #1901      +/-   ##
   ============================================
   - Coverage     85.62%   85.60%   -0.03%     
     Complexity      113      113              
   ============================================
     Files           276      276              
     Lines          6026     6029       +3     
     Branches        922      922              
   ============================================
   + Hits           5160     5161       +1     
   - Misses          526      527       +1     
   - Partials        340      341       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rdingsphere/elasticjob/infra/json/GsonFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/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-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9qc29uL0dzb25GYWN0b3J5LmphdmE=) | `100.00% <100.00%> (ø)` | |
   | [...e/shardingsphere/elasticjob/infra/env/IpUtils.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/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-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9lbnYvSXBVdGlscy5qYXZh) | `60.00% <0.00%> (-4.62%)` | :arrow_down: |
   | [...ite/internal/election/ElectionListenerManager.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/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-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvZWxlY3Rpb24vRWxlY3Rpb25MaXN0ZW5lck1hbmFnZXIuamF2YQ==) | `96.00% <0.00%> (+4.00%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?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-elasticjob/pull/1901?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 [b0a1d87...ffef073](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?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-elasticjob] codecov-commenter edited a comment on pull request #1901: Remove state pollution caused by test GsonFactoryTest.assertRegisterTypeAdapter to avoid order-dependent flaky tests

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?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 [#1901](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f7ebcc8) into [master](https://codecov.io/gh/apache/shardingsphere-elasticjob/commit/b0a1d8784efcccfe00d0c5035c9ab0997b46e09d?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b0a1d87) will **decrease** coverage by `0.04%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head f7ebcc8 differs from pull request most recent head ffef073. Consider uploading reports for the commit ffef073 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/graphs/tree.svg?width=650&height=150&src=pr&token=8ZMVc4Yo4Z&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-elasticjob/pull/1901?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    #1901      +/-   ##
   ============================================
   - Coverage     85.62%   85.58%   -0.05%     
     Complexity      113      113              
   ============================================
     Files           276      276              
     Lines          6026     6029       +3     
     Branches        922      922              
   ============================================
     Hits           5160     5160              
   - Misses          526      529       +3     
     Partials        340      340              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rdingsphere/elasticjob/infra/json/GsonFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/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-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9qc29uL0dzb25GYWN0b3J5LmphdmE=) | `100.00% <100.00%> (ø)` | |
   | [...re/elasticjob/lite/internal/setup/SetUpFacade.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/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-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvc2V0dXAvU2V0VXBGYWNhZGUuamF2YQ==) | `89.47% <0.00%> (-5.27%)` | :arrow_down: |
   | [...asticjob/lite/internal/storage/JobNodeStorage.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/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-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvc3RvcmFnZS9Kb2JOb2RlU3RvcmFnZS5qYXZh) | `87.50% <0.00%> (-3.58%)` | :arrow_down: |
   | [...e/shardingsphere/elasticjob/infra/env/IpUtils.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/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-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9lbnYvSXBVdGlscy5qYXZh) | `63.07% <0.00%> (-1.54%)` | :arrow_down: |
   | [...ite/internal/election/ElectionListenerManager.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901/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-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvZWxlY3Rpb24vRWxlY3Rpb25MaXN0ZW5lck1hbmFnZXIuamF2YQ==) | `96.00% <0.00%> (+4.00%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?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-elasticjob/pull/1901?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 [b0a1d87...ffef073](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1901?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