Skip to content

Commit 34f93ae

Browse files
author
Release Manager
committed
sagemathgh-38873: src/sage/parallel/map_reduce.py: fixup start_workers() test case In commit a181883 I made this test wait a bit longer (to be more robust under load) and added a "long time" to the corresponding start_workers() line. But, further down, there's another test that calls finish(), which needs the workers to be started. Without a "long time" on the finish(), it can fail sans --long. To fix it, we combine the two tests that call start_workers() and finish(), and then mark the whole thing "long time". The finish() is supposed to delete the workers created in setup_workers() as well, so there's not much point in trying to make the "long time" more fine- grained than that. URL: sagemath#38873 Reported by: Michael Orlitzky Reviewer(s):
2 parents 7c62275 + 94949db commit 34f93ae

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/sage/parallel/map_reduce.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,18 +1133,16 @@ def start_workers(self):
11331133
11341134
TESTS::
11351135
1136+
sage: # long time
11361137
sage: from sage.parallel.map_reduce import RESetMapReduce
11371138
sage: def children(x):
11381139
....: print(f"Starting: {x}", flush=True)
11391140
....: return []
11401141
sage: S = RESetMapReduce(roots=[1, 2], children=children)
11411142
sage: S.setup_workers(2)
1142-
sage: S.start_workers(); sleep(float(5)) # long time
1143+
sage: S.start_workers(); sleep(float(5))
11431144
Starting: ...
11441145
Starting: ...
1145-
1146-
Cleanup::
1147-
11481146
sage: S.finish()
11491147
"""
11501148
if self._nprocess == 0:

0 commit comments

Comments
 (0)