Commit 2a490386 authored by Jim Fulton's avatar Jim Fulton

Try to avoid spurious failure due to test race

parent 8c48c000
...@@ -1380,9 +1380,12 @@ constructor. ...@@ -1380,9 +1380,12 @@ constructor.
>>> addr, _ = start_server() >>> addr, _ = start_server()
>>> db = ZEO.DB(addr, client_label='test-label-1') >>> db = ZEO.DB(addr, client_label='test-label-1')
>>> db.close() >>> db.close()
>>> for line in open('server-%s.log' % addr[1]): >>> @wait_until
... if 'test-label-1' in line: ... def check_for_test_label_1():
... print line.split()[1:4] ... for line in open('server-%s.log' % addr[1]):
... if 'test-label-1' in line:
... print line.split()[1:4]
... return True
['INFO', 'ZEO.StorageServer', '(test-label-1'] ['INFO', 'ZEO.StorageServer', '(test-label-1']
You can specify the client label via a configuration file as well: You can specify the client label via a configuration file as well:
...@@ -1397,9 +1400,12 @@ You can specify the client label via a configuration file as well: ...@@ -1397,9 +1400,12 @@ You can specify the client label via a configuration file as well:
... </zodb> ... </zodb>
... ''' % addr[1]) ... ''' % addr[1])
>>> db.close() >>> db.close()
>>> for line in open('server-%s.log' % addr[1]): >>> @wait_until
... if 'test-label-2' in line: ... def check_for_test_label_2():
... print line.split()[1:4] ... for line in open('server-%s.log' % addr[1]):
... if 'test-label-2' in line:
... print line.split()[1:4]
... return True
['INFO', 'ZEO.StorageServer', '(test-label-2'] ['INFO', 'ZEO.StorageServer', '(test-label-2']
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment