This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new d8a11bc5c07a [SPARK-55103][CORE][TESTS] Fix a flaky test in 
`RpcIntegrationSuite`
d8a11bc5c07a is described below

commit d8a11bc5c07a45e39e0b76a43708322aa9ed49c9
Author: Kousuke Saruta <[email protected]>
AuthorDate: Wed Jan 21 09:24:31 2026 +0900

    [SPARK-55103][CORE][TESTS] Fix a flaky test in `RpcIntegrationSuite`
    
    ### What changes were proposed in this pull request?
    This PR aims to fix a flaky test in `RpcIntegrationSuite`.
    Recently, `sendRpcWithStreamFailures` occasionally fails.
    https://github.com/apache/spark/actions/runs/21073107447/job/60608256322
    ```
    [error] Test 
org.apache.spark.network.RpcIntegrationSuite.sendRpcWithStreamFailures failed: 
org.opentest4j.AssertionFailedError: Got a non-empty set [Failed to send RPC 
RPC 4622017872898699852 to localhost/127.0.0.1:41507: 
io.netty.channel.unix.Errors$NativeIoException: send(..) failed with 
error(-32): Broken pipe] ==> expected: <true> but was: <false>, took 0.018s
    [error]     at 
org.apache.spark.network.RpcIntegrationSuite.assertErrorAndClosed(RpcIntegrationSuite.java:377)
    [error]     at 
org.apache.spark.network.RpcIntegrationSuite.sendRpcWithStreamFailures(RpcIntegrationSuite.java:332)
    [info] Test 
org.apache.spark.network.RpcIntegrationSuite#sendRpcWithStreamOneAtATime() 
started
    [info] Test 
org.apache.spark.network.RpcIntegrationSuite#sendSuccessAndFailure() started
    [info] Test run finished: 1 failed, 0 ignored, 10 total, 0.195s
    ```
    
    The root cause seems that one of the expected error message is 
[java.io.IOException Broken 
pipe](https://github.com/apache/spark/blob/edc7c96741c4382f79956f7ff5b9077e45f92014/common/network-common/src/test/java/org/apache/spark/network/RpcIntegrationSuite.java#L370)
 but the actual error message is ` 
io.netty.channel.unix.Errors$NativeIoException: send(..) failed with 
error(-32): Broken pipe`.
    
    Actually, the old Netty threw `IOException` directly but newer Netty wraps 
`IOException` in `NativeIOException`.
    
https://github.com/netty/netty/blob/5272df455afcd1cfae3e1156d6ac958a69fca32a/transport-native-unix-common/src/main/java/io/netty/channel/unix/Errors.java#L87
    
    ### Why are the changes needed?
    For test stability.
    
    ### Does this PR introduce _any_ user-facing change?
    No.
    
    ### How was this patch tested?
    Self code review. Let's see this issue no longer occurs on CI.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No.
    
    Closes #53870 from sarutak/fix-rpc-test-issue.
    
    Authored-by: Kousuke Saruta <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit a28133134c4dfba0f720be30e000cc66eb42051c)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../src/test/java/org/apache/spark/network/RpcIntegrationSuite.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/common/network-common/src/test/java/org/apache/spark/network/RpcIntegrationSuite.java
 
b/common/network-common/src/test/java/org/apache/spark/network/RpcIntegrationSuite.java
index e229e32e9171..e76e843b053b 100644
--- 
a/common/network-common/src/test/java/org/apache/spark/network/RpcIntegrationSuite.java
+++ 
b/common/network-common/src/test/java/org/apache/spark/network/RpcIntegrationSuite.java
@@ -367,7 +367,7 @@ public class RpcIntegrationSuite {
         "Connection reset",
         "java.nio.channels.ClosedChannelException",
         "io.netty.channel.StacklessClosedChannelException",
-        "java.io.IOException: Broken pipe"
+        "Broken pipe"
     );
     Set<String> containsAndClosed = new HashSet<>(Set.of(expectedError));
     containsAndClosed.addAll(possibleClosedErrors);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to