示例#1
0
 def test_connect_timeout(self):
     HttpClientIntegrationTest.setUp(self)
     hosts = ['localhost:%s' % port for port in self.nsqd_ports]
     connect_timeout = 2.0
     self.client = client.Client(nsqd_tcp_addresses=hosts,
                                 connect_timeout=connect_timeout)
     self.assertEqual(self.client._connect_timeout, connect_timeout)
示例#2
0
 def setUp(self):
     '''Return a connection'''
     HttpClientIntegrationTest.setUp(self)
     nsqd_tcp_addresses = [
         'localhost:%s' % port for port in self.nsqd_ports
     ]
     self.client = reader.Reader(self.topic,
                                 self.channel,
                                 nsqd_tcp_addresses=nsqd_tcp_addresses)
示例#3
0
 def setUp(self):
     '''Return a connection'''
     HttpClientIntegrationTest.setUp(self)
     nsqd_tcp_addresses = ['localhost:%s' % port for port in self.nsqd_ports]
     self.client = reader.Reader(
         self.topic, self.channel, nsqd_tcp_addresses=nsqd_tcp_addresses)
示例#4
0
 def setUp(self):
     '''Return a new client'''
     HttpClientIntegrationTest.setUp(self)
     self.client = client.Client(topic=self.topic, lookupd_http_addresses=['http://localhost:14161'])
示例#5
0
 def setUp(self):
     '''Return a new client'''
     HttpClientIntegrationTest.setUp(self)
     hosts = ['localhost:%s' % port for port in self.nsqd_ports]
     self.client = client.Client(nsqd_tcp_addresses=hosts)
示例#6
0
文件: test_client.py 项目: mxr/nsq-py
 def setUp(self):
     '''Return a new client'''
     HttpClientIntegrationTest.setUp(self)
     self.client = client.Client(topic=self.topic, lookupd_http_addresses=['http://localhost:14161'])
示例#7
0
文件: test_client.py 项目: mxr/nsq-py
 def setUp(self):
     '''Return a new client'''
     HttpClientIntegrationTest.setUp(self)
     hosts = ['localhost:%s' % port for port in self.nsqd_ports]
     self.client = client.Client(nsqd_tcp_addresses=hosts)
示例#8
0
 def setUp(self):
     HttpClientIntegrationTest.setUp(self)
     self.connection = connection.Connection('localhost',
                                             14150,
                                             tls_v1=True)
     self.connection.setblocking(0)
示例#9
0
 def setUp(self):
     HttpClientIntegrationTest.setUp(self)
     self.connection = connection.Connection('localhost', 14150, tls_v1=True)
     self.connection.setblocking(0)
示例#10
0
 def test_connect_timeout(self):
     HttpClientIntegrationTest.setUp(self)
     hosts = ['localhost:%s' % port for port in self.nsqd_ports]
     connect_timeout = 2.0
     self.client = client.Client(nsqd_tcp_addresses=hosts, connect_timeout=connect_timeout)
     self.assertEqual(self.client._connect_timeout, connect_timeout)