From 4c50c99a4cc1d606abaff82d4353d4591422cfd8 Mon Sep 17 00:00:00 2001 From: Manu <3916435+m3nu@users.noreply.github.com> Date: Fri, 22 May 2020 20:49:04 +0800 Subject: [PATCH] Avoid starting Borg thread at the end of test. (#465) --- tests/test_archives.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/test_archives.py b/tests/test_archives.py index 9cbc5cfc..0a448c13 100644 --- a/tests/test_archives.py +++ b/tests/test_archives.py @@ -101,12 +101,10 @@ def test_archive_mount(qapp, qtbot, mocker, borg_json_output, monkeypatch, choos ) qtbot.mouseClick(tab.mountButton, QtCore.Qt.LeftButton) - qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Mounted'), timeout=5000) + qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Mounted'), timeout=10000) qtbot.mouseClick(tab.mountButton, QtCore.Qt.LeftButton) - # qtbot.waitUntil(lambda: tab.mountErrors.text() == 'No active Borg mounts found.') - - qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Un-mounted successfully.'), timeout=5000) + qtbot.waitUntil(lambda: tab.mountErrors.text().startswith('Un-mounted successfully.'), timeout=10000) def test_archive_extract(qapp, qtbot, mocker, borg_json_output, monkeypatch): @@ -127,12 +125,11 @@ def test_archive_extract(qapp, qtbot, mocker, borg_json_output, monkeypatch): mocker.patch.object(vorta.borg.borg_thread, 'Popen', return_value=popen_result) qtbot.mouseClick(tab.extractButton, QtCore.Qt.LeftButton) - qtbot.waitUntil(lambda: hasattr(tab, '_window'), timeout=5000) + qtbot.waitUntil(lambda: hasattr(tab, '_window'), timeout=10000) assert tab._window.treeView.model().rootItem.childItems[0].data(0) == 'Users' tab._window.treeView.model().rootItem.childItems[0].load_children() assert tab._window.archiveNameLabel.text().startswith('test-archive, 2000') - tab._window.accept() def test_archive_diff(qapp, qtbot, mocker, borg_json_output, monkeypatch):