test: Longer timeout for model download

This commit is contained in:
Fam Zheng 2024-12-21 11:12:51 +00:00
parent 023670a2ed
commit dbec9ecaf5

View File

@ -25,7 +25,7 @@ class Testing(unittest.TestCase):
cmd = ['python3', 'app.py', '-l', '127.0.0.1', '-p', str(port)] cmd = ['python3', 'app.py', '-l', '127.0.0.1', '-p', str(port)]
p = subprocess.Popen(cmd, cwd=BASE_DIR) p = subprocess.Popen(cmd, cwd=BASE_DIR)
start = time.time() start = time.time()
while p.poll() == None and time.time() - start < 600: while p.poll() == None and time.time() - start < 1200:
try: try:
url = 'http://localhost:%d' % port url = 'http://localhost:%d' % port
if 'emblem' in requests.get(url, timeout=1).text: if 'emblem' in requests.get(url, timeout=1).text: