diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py index 9bb5181377..7923108449 100644 --- a/Lib/test/test_queue.py +++ b/Lib/test/test_queue.py @@ -426,6 +426,10 @@ def feed(self, q, seq, rnd): val = seq.pop() except IndexError: return + if len(seq) < 60 and val is not None: + # force a delay for some non-sentinel values near the end of + # the input sequence + time.sleep(rnd.random() * 1e-2) q.put(val) if rnd.random() > 0.5: time.sleep(rnd.random() * 1e-3)