| 1 |
From: YOKOTA Hiroshi <[email protected]> |
| 2 |
Date: Thu, 14 Jul 2022 23:03:16 +0900 |
| 3 |
Subject: Extend timeout limit |
| 4 |
|
| 5 |
Forwarded: not-needed |
| 6 |
--- |
| 7 |
src/calibre/db/tests/filesystem.py | 2 +- |
| 8 |
src/calibre/db/tests/fts_api.py | 4 ++-- |
| 9 |
2 files changed, 3 insertions(+), 3 deletions(-) |
| 10 |
|
| 11 |
diff --git a/src/calibre/db/tests/filesystem.py b/src/calibre/db/tests/filesystem.py |
| 12 |
index 46efdc2..bae0a7e 100644 |
| 13 |
--- a/src/calibre/db/tests/filesystem.py |
| 14 |
+++ b/src/calibre/db/tests/filesystem.py |
| 15 |
@@ -347,7 +347,7 @@ class FilesystemTest(BaseTest): |
| 16 |
cache.enable_fts() |
| 17 |
cache.set_fts_num_of_workers(4) |
| 18 |
st = time.monotonic() |
| 19 |
- while cache.fts_indexing_left > 0 and time.monotonic() - st < 15: |
| 20 |
+ while cache.fts_indexing_left > 0 and time.monotonic() - st < 300: |
| 21 |
time.sleep(0.05) |
| 22 |
if cache.fts_indexing_left > 0: |
| 23 |
raise ValueError('FTS indexing did not complete') |
| 24 |
diff --git a/src/calibre/db/tests/fts_api.py b/src/calibre/db/tests/fts_api.py |
| 25 |
index 212f140..d0af671 100644 |
| 26 |
--- a/src/calibre/db/tests/fts_api.py |
| 27 |
+++ b/src/calibre/db/tests/fts_api.py |
| 28 |
@@ -54,7 +54,7 @@ class FTSAPITest(BaseTest): |
| 29 |
self.libraries_to_close.append(ans) |
| 30 |
return ans |
| 31 |
|
| 32 |
- def wait_for_fts_to_finish(self, fts, timeout=30): |
| 33 |
+ def wait_for_fts_to_finish(self, fts, timeout=3000): |
| 34 |
import apsw |
| 35 |
|
| 36 |
if fts.pool.initialized: |
| 37 |
@@ -133,7 +133,7 @@ class FTSAPITest(BaseTest): |
| 38 |
|
| 39 |
# check shutdown when workers have hung |
| 40 |
for w in fts.pool.workers: |
| 41 |
- w.code_to_exec = 'import time; time.sleep(100)' |
| 42 |
+ w.code_to_exec = 'import time; time.sleep(1000)' |
| 43 |
cache.add_format(1, 'TXTZ', self.make_txtz(b'hung worker')) |
| 44 |
workers = list(fts.pool.workers) |
| 45 |
cache.close() |