Commit df49e91b authored by Marius Gedminas's avatar Marius Gedminas

Try to fix test error on winbot

Instead of waiting for five arbitrary log messages let's wait for at
least two particular log messages, since the intent of this test is to
show that we're getting at least two of those.
parent 36031760
......@@ -1148,22 +1148,17 @@ def client_has_newer_data_than_server():
>>> _, admin = start_server(addr=addr)
>>> for i in range(1000):
... while len(handler.records) < 5:
... time.sleep(.01)
>>> db.close()
>>> client_errors = [x for x in handler.records
>>> wait_until('got enough errors', lambda:
... len([x for x in handler.records
... if x.filename == 'ClientStorage.py' and
... x.funcName == 'verify_cache' and
... x.levelname == 'CRITICAL' and
... x.msg == 'client Client has seen '
... 'newer transactions than server!']
>>> len(client_errors) >= 2
True
... 'newer transactions than server!']) >= 2)
Note that the errors repeat because the client keeps on trying to connect.
>>> db.close()
>>> handler.uninstall()
>>> stop_server(admin)
......
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