GitHub user zsxwing opened a pull request: https://github.com/apache/spark/pull/23041
[SPARK-26069][TESTS]Fix flaky test: RpcIntegrationSuite.sendRpcWithStreamFailures ## What changes were proposed in this pull request? The test failure is because `assertErrorAndClosed` misses one possible error message: `java.nio.channels.ClosedChannelException`. This happens when the second `uploadStream` is called after the channel has been closed. This can be reproduced by adding `Thread.sleep(1000)` below this line: https://github.com/apache/spark/blob/03306a6df39c9fd6cb581401c13c4dfc6bbd632e/common/network-common/src/test/java/org/apache/spark/network/RpcIntegrationSuite.java#L217 This PR fixes the above issue and also improves the test failure messages of `assertErrorAndClosed`. ## How was this patch tested? Jenkins You can merge this pull request into a Git repository by running: $ git pull https://github.com/zsxwing/spark SPARK-26069 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/23041.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #23041 ---- commit 6bebcb5e004ed4b434c550d26ed1a922d13e0446 Author: Shixiong Zhu <zsxwing@...> Date: 2018-11-15T07:16:00Z fix test ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org