Skip to content

Commit

Permalink
More attempting to workaround #24
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Sep 7, 2021
1 parent a82030f commit 0c0ce9a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/nti/mailer/tests/test_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,15 @@ def test_delivery_messages_arrive_while_waiting(self):
import time
# Next time we yield to the hub, this will get called.
def q():
self._queue_two_messages()
# Sleep (blocking) in case our stat watcher has
# Sleep in case our stat watcher has
# very poor mtime resolution; we don't want a false
# negative in our detection. For libuv watchers,
# 0.5 seems to be enough. But for libev watchers on GHA,
# we need a full second.
time.sleep(1.0)
# we need a full second. Do this ahead of time, non-blocking,
# so the stat watcher has a chance to get a before-time
gevent.sleep(1.0)
self._queue_two_messages()


gevent.spawn(q)

Expand Down

0 comments on commit 0c0ce9a

Please sign in to comment.