public class ServerSocketConcurrentCloseTest
extends TestCase
ServerSocket.close()
and
ServerSocket.accept()
.Constructor and Description |
---|
ServerSocketConcurrentCloseTest() |
Modifier and Type | Method and Description |
---|---|
void |
testConcurrentServerSocketCloseReliablyThrows()
Test for b/27763633.
|
void |
testImplAccept_detectsClosedState()
The implementation of
ServerSocket.accept() checks closed state before
delegating to the ServerSocket.implAccept(Socket) , however this is not
sufficient for correctness because the socket might be closed after the check. |
public void testImplAccept_detectsClosedState() throws Exception
ServerSocket.accept()
checks closed state before
delegating to the ServerSocket.implAccept(Socket)
, however this is not
sufficient for correctness because the socket might be closed after the check.
This checks that implAccept() itself also detects closed sockets and throws
SocketException.Exception
public void testConcurrentServerSocketCloseReliablyThrows()