test_logging: minor tweaks to timeouts, listening tests marked as skipped.

This commit is contained in:
Vinay Sajip 2010-02-05 23:43:11 +00:00
parent ba7732ea6a
commit 2373926964
1 changed files with 6 additions and 3 deletions

View File

@ -1579,6 +1579,7 @@ class ConfigDictTest(BaseTest):
t.start() t.start()
try: try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(2.0)
sock.connect(('localhost', port)) sock.connect(('localhost', port))
slen = struct.pack('>L', len(text)) slen = struct.pack('>L', len(text))
@ -1592,9 +1593,10 @@ class ConfigDictTest(BaseTest):
sock.close() sock.close()
finally: finally:
logging.config.stopListening() logging.config.stopListening()
t.join() t.join(2.0)
def notest_listen_config_10_ok(self): @unittest.skip("See issue #7857")
def test_listen_config_10_ok(self):
with captured_stdout() as output: with captured_stdout() as output:
self.setup_via_listener(json.dumps(self.config10)) self.setup_via_listener(json.dumps(self.config10))
logger = logging.getLogger("compiler.parser") logger = logging.getLogger("compiler.parser")
@ -1613,7 +1615,8 @@ class ConfigDictTest(BaseTest):
('ERROR', '4'), ('ERROR', '4'),
], stream=output) ], stream=output)
def notest_listen_config_1_ok(self): @unittest.skip("See issue #7857")
def test_listen_config_1_ok(self):
with captured_stdout() as output: with captured_stdout() as output:
self.setup_via_listener(textwrap.dedent(ConfigFileTest.config1)) self.setup_via_listener(textwrap.dedent(ConfigFileTest.config1))
logger = logging.getLogger("compiler.parser") logger = logging.getLogger("compiler.parser")