From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
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 363aa5a..490abd2 100644
--- a/src/calibre/db/tests/filesystem.py
+++ b/src/calibre/db/tests/filesystem.py
@@ -171,7 +171,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 38ac102..b315991 100644
--- a/src/calibre/db/tests/fts_api.py
+++ b/src/calibre/db/tests/fts_api.py
@@ -53,7 +53,7 @@ class FTSAPITest(BaseTest):
         self.libraries_to_close.append(ans)
         return ans
 
-    def wait_for_fts_to_finish(self, fts, timeout=10):
+    def wait_for_fts_to_finish(self, fts, timeout=1000):
         if fts.pool.initialized:
             st = time.monotonic()
             while fts.all_currently_dirty() and time.monotonic() - st < timeout:
@@ -123,7 +123,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()
