Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/1758#discussion_r15829928
--- 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 --
I'll update the test to check whether the failure is due to a timeout
exception or some other exception. This might be important because I think
this current test might have passed even with the old code due to the timeouts
(the original PR didn't have this issue; I think I inadvertently messed it up
while refactoring).
---
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]