From: YOKOTA Hiroshi Date: Thu, 14 Jul 2022 23:03:16 +0900 Subject: Extend timeout limit Forwarded: not-needed --- src/calibre/db/tests/filesystem.py | 2 +- src/calibre/db/tests/fts_api.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/db/tests/filesystem.py b/src/calibre/db/tests/filesystem.py index 46efdc2..bae0a7e 100644 --- a/src/calibre/db/tests/filesystem.py +++ b/src/calibre/db/tests/filesystem.py @@ -347,7 +347,7 @@ class FilesystemTest(BaseTest): cache.enable_fts() cache.set_fts_num_of_workers(4) st = time.monotonic() - while cache.fts_indexing_left > 0 and time.monotonic() - st < 15: + while cache.fts_indexing_left > 0 and time.monotonic() - st < 300: time.sleep(0.05) if cache.fts_indexing_left > 0: raise ValueError('FTS indexing did not complete') diff --git a/src/calibre/db/tests/fts_api.py b/src/calibre/db/tests/fts_api.py index 212f140..d0af671 100644 --- a/src/calibre/db/tests/fts_api.py +++ b/src/calibre/db/tests/fts_api.py @@ -54,7 +54,7 @@ class FTSAPITest(BaseTest): self.libraries_to_close.append(ans) return ans - def wait_for_fts_to_finish(self, fts, timeout=30): + def wait_for_fts_to_finish(self, fts, timeout=3000): import apsw if fts.pool.initialized: @@ -133,7 +133,7 @@ class FTSAPITest(BaseTest): # check shutdown when workers have hung for w in fts.pool.workers: - w.code_to_exec = 'import time; time.sleep(100)' + w.code_to_exec = 'import time; time.sleep(1000)' cache.add_format(1, 'TXTZ', self.make_txtz(b'hung worker')) workers = list(fts.pool.workers) cache.close()