You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "maple525866 (via GitHub)" <gi...@apache.org> on 2025/07/09 12:27:03 UTC

[PR] optimize: Avoid using unstable API in ChannelEventHandlerIntegrationTest [incubator-seata]

maple525866 opened a new pull request, #7514:
URL: https://github.com/apache/incubator-seata/pull/7514

   <!--
       Licensed to the Apache Software Foundation (ASF) under one or more
       contributor license agreements.  See the NOTICE file distributed with
       this work for additional information regarding copyright ownership.
       The ASF licenses this file to You under the Apache License, Version 2.0
       (the "License"); you may not use this file except in compliance with
       the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
       
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
   -->
   <!-- Please make sure you have read and understood the contributing guidelines -->
   
   - [ ] I have registered the PR [changes](../changes).
   
   ### Ⅰ. Describe what this PR did
   After my research on the error, I found that it cannot be compiled on macOS 14, and the error "cannot find symbol: method registeredChannelsIterator()" is reported. The main reason is that the unstable API (@UnstableApi) in netty is used, specifically eventLoop.registeredChannelsIterator() in collectServerChannels.
   
   My solution:
   Avoid using unstable APIs, remove the original collectServerChannels, and refactor the testChannelInactiveByServer() method.
   
   Results:
   1. The code should be able to compile normally on macOS
   2. All event handling of ChannelEventHandler is tested
   3. The test logic is simplified, cross-platform compatibility is improved, and each test method does not affect each other
   
   ### Ⅱ. Does this pull request fix one issue?
   <!-- If that, add "fixes #xxx" below in the next line, for example, fixes #97. -->
   fixes #7510 
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)? 
   
   
   ### Ⅳ. Describe how to verify it
   mvn clean test
   
   ### Ⅴ. Special notes for reviews
   
   


-- 
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@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: Avoid using unstable API in ChannelEventHandlerIntegrationTest [incubator-seata]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #7514:
URL: https://github.com/apache/incubator-seata/pull/7514#issuecomment-3052524730

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-seata/pull/7514?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 60.42%. Comparing base [(`a18e999`)](https://app.codecov.io/gh/apache/incubator-seata/commit/a18e999b2bc351c3603ec13ae5445ae8c6d6b45c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`5c87668`)](https://app.codecov.io/gh/apache/incubator-seata/commit/5c87668c3b56362a2abbcfff805e1767da0d5b33?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@            Coverage Diff            @@
   ##                2.x    #7514   +/-   ##
   =========================================
     Coverage     60.42%   60.42%           
   + Complexity      662      658    -4     
   =========================================
     Files          1298     1298           
     Lines         49080    49080           
     Branches       5770     5770           
   =========================================
   + Hits          29655    29657    +2     
   - Misses        16790    16791    +1     
   + Partials       2635     2632    -3     
   ```
   
   [see 7 files with indirect coverage changes](https://app.codecov.io/gh/apache/incubator-seata/pull/7514/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/incubator-seata/pull/7514/graphs/tree.svg?width=650&height=150&src=pr&token=tbmHt2ZfxO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/incubator-seata/pull/7514?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: avoid using unstable API in ChannelEventHandlerIntegrationTest [incubator-seata]

Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly commented on PR #7514:
URL: https://github.com/apache/incubator-seata/pull/7514#issuecomment-3055148195

   @maple525866 I will first run the full test on branch 2.5.0. If the test is successful, please synchronize a copy of the code to the 2.x branch.


-- 
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@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: avoid using unstable API in ChannelEventHandlerIntegrationTest [incubator-seata]

Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly merged PR #7514:
URL: https://github.com/apache/incubator-seata/pull/7514


-- 
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@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [PR] optimize: avoid using unstable API in ChannelEventHandlerIntegrationTest [incubator-seata]

Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly commented on PR #7514:
URL: https://github.com/apache/incubator-seata/pull/7514#issuecomment-3055681701

   @maple525866 Verification successful. You can cherry-pick to the 2.x branch.


-- 
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@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org