Skip to content

Commit

Permalink
improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
reyang committed May 15, 2019
1 parent cfea29b commit 369c072
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/common/test_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ def test_gets_event(self):
def test_flush_timeout(self):
queue = Queue(capacity=10)
self.assertIsNone(queue.flush(timeout=TIMEOUT))
queue.puts(range(100), timeout=TIMEOUT)
self.assertIsNone(queue.flush(timeout=TIMEOUT))

def proc():
for item in queue.gets(count=1, timeout=TIMEOUT):
if isinstance(item, QueueEvent):
item.set()

task = PeriodicTask(TIMEOUT / 10, proc)
task.start()
try:
Expand Down

0 comments on commit 369c072

Please sign in to comment.