tests: Speculatively stabilize history tests

If we're not waiting for the async INSERT in the SQL database, it can happen
that :debug-dump-history gets called before the history entry was addeded to the
actual database.

See #5390
This commit is contained in:
Florian Bruhin 2021-06-15 16:53:58 +02:00
parent 2782b750ae
commit 1dddbe697e
1 changed files with 1 additions and 0 deletions

View File

@ -50,6 +50,7 @@ def check_query(quteproc, name, value):
@bdd.then(bdd.parsers.parse("the history should contain:\n{expected}"))
def check_history(quteproc, server, tmpdir, expected):
quteproc.wait_for(message='INSERT INTO History *', category='sql')
path = tmpdir / 'history'
quteproc.send_cmd(':debug-dump-history "{}"'.format(path))
quteproc.wait_for(category='message', loglevel=logging.INFO,