LuciferYang opened a new pull request #35923:
URL: https://github.com/apache/spark/pull/35923


   ### What changes were proposed in this pull request?
   This pr change use `Assert.assertThrows` instead of Exception `expected` of 
`testWritingPendingBufsIsAbortedImmediatelyDuringComplete` in 
`RemoteBlockPushResolverSuite` to ensure that the expected statement throws the 
expected exception.
   
   
   ### Why are the changes needed?
   Bug fix.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   
   ### How was this patch tested?
   
   - Pass GA
   - Manual test
   
   Only use `Assert.assertThrows` instead of Exception `expected`, not change 
others of the test case, run
   
   ```
   mvn clean test 
-Dtest=RemoteBlockPushResolverSuite#testWritingPendingBufsIsAbortedImmediatelyDuringComplete
 -DwildcardSuites=none -pl common/network-shuffle -am
   
   ```
   
   **Before**
   
   ```
   [INFO] Running org.apache.spark.network.shuffle.RemoteBlockPushResolverSuite
   [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
0.393 s <<< FAILURE! - in 
org.apache.spark.network.shuffle.RemoteBlockPushResolverSuite
   [ERROR] 
org.apache.spark.network.shuffle.RemoteBlockPushResolverSuite.testWritingPendingBufsIsAbortedImmediatelyDuringComplete
  Time elapsed: 0.355 s  <<< ERROR!
   org.apache.spark.network.server.BlockPushNonFatalFailure: Block 
shufflePush_0_0_5_0 is from an older app attempt
   ```
   
   **After**
   ```
   [INFO] Running org.apache.spark.network.shuffle.RemoteBlockPushResolverSuite
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.405 
s - in org.apache.spark.network.shuffle.RemoteBlockPushResolverSuite
   [INFO] 
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
   
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to