From 3b962b4b3f00389e2e66a3265dab2b1caa5b8127 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 19 Jun 2026 16:30:40 -0500 Subject: [PATCH 1/2] Try `time.sleep(0)` across all tests --- tests/unittest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unittest.py b/tests/unittest.py index 93131521d03..b31012ccb9e 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -734,7 +734,12 @@ def pump(self, by: float = 0.0) -> None: # second steps/increments. We assume this was done so that when you use the # clock to schedule something that schedules more things, it tries to run the # whole chain to completion. - self.reactor.pump([by] * 100) + for _ in range(100): + self.reactor.advance(by) + # Allow other threads to make progress. This is real sleep time so we don't + # want to actually sleep for the same amount of time someone wants to + # advance the Twisted clock for. + time.sleep(0) def get_success(self, d: Awaitable[TV], by: float = 0.0) -> TV: deferred: Deferred[TV] = ensureDeferred(d) # type: ignore[arg-type] From 4a1e1098b95870b970a1248670dbc36792f9c3b0 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Fri, 19 Jun 2026 16:34:23 -0500 Subject: [PATCH 2/2] Add changelog --- changelog.d/19870.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/19870.misc diff --git a/changelog.d/19870.misc b/changelog.d/19870.misc new file mode 100644 index 00000000000..83760993ca1 --- /dev/null +++ b/changelog.d/19870.misc @@ -0,0 +1 @@ +Stub.