Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/1758#discussion_r15839302
--- Diff:
core/src/test/scala/org/apache/spark/network/ConnectionManagerSuite.scala ---
@@ -223,7 +223,30 @@ class ConnectionManagerSuite extends FunSuite {
managerServer.stop()
}
+ test("Ack error message") {
+ val conf = new SparkConf
+ conf.set("spark.authenticate", "false")
+ val securityManager = new SecurityManager(conf)
+ val manager = new ConnectionManager(0, conf, securityManager)
+ val managerServer = new ConnectionManager(0, conf, securityManager)
+ managerServer.onReceiveMessage((msg: Message, id: ConnectionManagerId)
=> {
+ throw new Exception
+ })
+ val size = 10 * 1024 * 1024
+ val buffer =
ByteBuffer.allocate(size).put(Array.tabulate[Byte](size)(x => x.toByte))
+ buffer.flip
+ val bufferMessage = Message.createBufferMessage(buffer)
+
+ val future = manager.sendMessageReliably(managerServer.id,
bufferMessage)
+
+ val message = Try(Await.result(future, 1 second))
--- End diff --
There are some other tests that use `sendMessageReliablySync`, which has an
infinite timeout. This method is only used in one or two places, so I'm going
to remove it and force callers to supply their own timeouts.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]