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

   <!--
       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 -->
   
   - [x] I have registered the PR [changes](../changes).
   
   
   This pull request includes updates to improve test coverage and fix a port 
configuration issue in the Netty-based RPC module. The key changes involve 
adding new mock objects and method stubbing in the `ChannelEventListenerTest` 
class, as well as updating a server port constant in the 
`ChannelEventHandlerIntegrationTest` class.
   
   ### Test coverage improvements:
   
   * 
`core/src/test/java/org/apache/seata/core/rpc/netty/ChannelEventListenerTest.java`:
     - Added a mock object for `ChannelId` and updated the 
`testChannelDisconnectedEvent` and `testChannelExceptionEvent` methods to stub 
the `id()` method of the `Channel` mock. This ensures more accurate simulation 
of channel behavior during tests. 
[[1]](diffhunk://#diff-1a65aed251f068b700d616f8a064d51554d34f89ff016cb0a7784751a370a774R41-R43)
 
[[2]](diffhunk://#diff-1a65aed251f068b700d616f8a064d51554d34f89ff016cb0a7784751a370a774R87)
 
[[3]](diffhunk://#diff-1a65aed251f068b700d616f8a064d51554d34f89ff016cb0a7784751a370a774R98)
     - Imported the `when` method from Mockito to enable method stubbing.
     - Added the `ChannelId` import to support the new mock object.
   
   ### Port configuration fix:
   
   * 
`core/src/test/java/org/apache/seata/core/rpc/netty/ChannelEventHandlerIntegrationTest.java`:
     - Updated the `SERVER_PORT` constant from `8091` to `8919` to resolve a 
potential conflict or misconfiguration issue.
   


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

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


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

Reply via email to