Rename ErrorClose event to ErrorClosed

This commit is contained in:
Mathias 2013-01-23 11:47:12 +01:00
parent 7761b00122
commit 385fd322c9
4 changed files with 8 additions and 8 deletions

View file

@ -173,7 +173,7 @@ object Tcp extends ExtensionKey[TcpExt] {
case object Aborted extends ConnectionClosed
case object ConfirmedClosed extends ConnectionClosed
case object PeerClosed extends ConnectionClosed
case class ErrorClose(cause: String) extends ConnectionClosed
case class ErrorClosed(cause: String) extends ConnectionClosed
}
class TcpExt(system: ExtendedActorSystem) extends IO.Extension {

View file

@ -210,7 +210,7 @@ private[io] abstract class TcpConnection(val channel: SocketChannel,
}
def handleError(handler: ActorRef, exception: IOException): Unit = {
closedMessage = CloseInformation(Set(handler), ErrorClose(extractMsg(exception)))
closedMessage = CloseInformation(Set(handler), ErrorClosed(extractMsg(exception)))
throw exception
}

View file

@ -28,7 +28,7 @@ class IntegrationSpec extends AkkaSpec("akka.loglevel = INFO") with IntegrationS
val (clientHandler, clientConnection, serverHandler, serverConnection) = establishNewClientConnection()
clientHandler.send(clientConnection, Abort)
clientHandler.expectMsg(Aborted)
serverHandler.expectMsgType[ErrorClose]
serverHandler.expectMsgType[ErrorClosed]
verifyActorTermination(clientConnection)
verifyActorTermination(serverConnection)
}

View file

@ -245,7 +245,7 @@ class TcpConnectionSpec extends AkkaSpec("akka.io.tcp.register-timeout = 500ms")
abortClose(serverSideChannel)
selector.send(connectionActor, ChannelReadable)
connectionHandler.expectMsgType[ErrorClose].cause must be("Connection reset by peer")
connectionHandler.expectMsgType[ErrorClosed].cause must be("Connection reset by peer")
// wait a while
connectionHandler.expectNoMsg(200.millis)
@ -259,8 +259,8 @@ class TcpConnectionSpec extends AkkaSpec("akka.io.tcp.register-timeout = 500ms")
abortClose(serverSideChannel)
writer.send(connectionActor, Write(ByteString("testdata")))
// bother writer and handler should get the message
writer.expectMsgType[ErrorClose]
connectionHandler.expectMsgType[ErrorClose]
writer.expectMsgType[ErrorClosed]
connectionHandler.expectMsgType[ErrorClosed]
assertThisConnectionActorTerminated()
}
@ -272,7 +272,7 @@ class TcpConnectionSpec extends AkkaSpec("akka.io.tcp.register-timeout = 500ms")
localServer.close()
selector.send(connectionActor, ChannelConnectable)
userHandler.expectMsgType[ErrorClose].cause must be("Connection reset by peer")
userHandler.expectMsgType[ErrorClosed].cause must be("Connection reset by peer")
verifyActorTermination(connectionActor)
}
@ -288,7 +288,7 @@ class TcpConnectionSpec extends AkkaSpec("akka.io.tcp.register-timeout = 500ms")
key.isConnectable must be(true)
selector.send(connectionActor, ChannelConnectable)
userHandler.expectMsgType[ErrorClose].cause must be("Connection refused")
userHandler.expectMsgType[ErrorClosed].cause must be("Connection refused")
verifyActorTermination(connectionActor)
}