935
935
server_protocol = self.build_protocol_socket('bzr request 2\n')
936
936
self.assertProtocolTwo(server_protocol)
938
def test_socket_default_timeout(self):
939
server_sock, client_sock = self.portable_socket_pair()
940
server = medium.SmartServerSocketStreamMedium(server_sock, None)
941
self.assertEqual(server._DEFAULT_CLIENT_TIMEOUT,
942
server._client_timeout)
944
def test_socket_set_timeout(self):
945
server_sock, client_sock = self.portable_socket_pair()
946
server = medium.SmartServerSocketStreamMedium(server_sock, None,
948
self.assertEqual(1.23, server._client_timeout)
950
def test_pipe_default_timeout(self):
951
server = medium.SmartServerPipeStreamMedium(None, None, None)
952
self.assertEqual(server._DEFAULT_CLIENT_TIMEOUT,
953
server._client_timeout)
955
def test_pipe_set_timeout(self):
956
server = medium.SmartServerPipeStreamMedium(None, None, None,
958
self.assertEqual(1.23, server._client_timeout)
938
960
def test_socket_wait_for_bytes_with_timeout_with_data(self):
939
961
server_sock, client_sock = self.portable_socket_pair()
940
962
self.addCleanup(server_sock.close)