Skip to content

Commit 83673de

Browse files
committed
Error ACKs should trigger IOExceptions, so catch only those exceptions in the test.
1 parent b8bb4d4 commit 83673de

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/test/scala/org/apache/spark/network/ConnectionManagerSuite.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,9 @@ class ConnectionManagerSuite extends FunSuite {
246246

247247
val future = manager.sendMessageReliably(managerServer.id, bufferMessage)
248248

249-
val message = Try(Await.result(future, 1 second))
250-
assert(message.isFailure)
249+
intercept[IOException] {
250+
Await.result(future, 1 second)
251+
}
251252

252253
manager.stop()
253254
managerServer.stop()

0 commit comments

Comments
 (0)