File: 0005-Extend-timeout-limit.patch

package info (click to toggle)
calibre 8.16.2%2Bds%2B~0.10.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 446,048 kB
  • sloc: python: 456,773; cpp: 151,500; ansic: 85,816; javascript: 57,787; xml: 1,247; sh: 957; sql: 735; objc: 330; makefile: 77; sed: 3
file content (45 lines) | stat: -rw-r--r-- 1,807 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 79b88da..37f6f26 100644
--- a/src/calibre/db/tests/filesystem.py
+++ b/src/calibre/db/tests/filesystem.py
@@ -294,7 +294,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 6318e69..5512c70 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=30):
+    def wait_for_fts_to_finish(self, fts, timeout=3000):
         import apsw
         if fts.pool.initialized:
             st = time.monotonic()
@@ -130,7 +130,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()