Skip to content

Commit c37453b

Browse files
committed
Fix potential crash in tests
We need to wait for the thread to finish
1 parent d0cc0f5 commit c37453b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import os
33
from unittest.mock import patch
4+
45
from PySide6.QtTest import QSignalSpy, QTest
56

67
from qgitc.gitutils import Git, GitProcess
@@ -59,6 +60,10 @@ def testUpdateRepo(self):
5960
self.app.updateRepoDir(oldRepoDir)
6061
self.assertEqual(spy.count(), 2)
6162

63+
if self.app._findSubmoduleThread and self.app._findSubmoduleThread.isRunning():
64+
self.app._findSubmoduleThread.requestInterruption()
65+
self.app._findSubmoduleThread.wait()
66+
6267

6368
class TestAppNoRepo(TestBase):
6469
def doCreateRepo(self):

0 commit comments

Comments
 (0)