Skip to content

Commit

Permalink
Small fixes following review
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Sep 28, 2023
1 parent 56c27e9 commit a2fe1e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_periodic_scheduling_most_recent_recent(self, temp_schedule, make_task):
def test_periodic_scheduling_most_recent_overdue_complete(
self, temp_schedule, make_task
):
"""most recent task is overdue but still running => request a new execution"""
"""most recent task is overdue and not running => request a new execution"""
most_recent = make_task(temp_schedule["name"])
now = getnow()
with Session.begin() as session:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@


class TestTaskEvents:
def test_task_event_reserved(self, temp_schedule, make_task, worker):
def test_task_event_reserved_updates_most_recent_task(
self, temp_schedule, make_task, worker
):
task = make_task(schedule_name=temp_schedule["name"])
with Session.begin() as session:
schedule = dbm.Schedule.get(session, temp_schedule["name"])
Expand All @@ -15,7 +17,9 @@ def test_task_event_reserved(self, temp_schedule, make_task, worker):
)
assert schedule.most_recent_task_id == task["_id"]

def test_task_event_started(self, temp_schedule, make_task, worker):
def test_task_event_started_does_not_updates_most_recent_task(
self, temp_schedule, make_task, worker
):
task = make_task(schedule_name=temp_schedule["name"])
with Session.begin() as session:
schedule = dbm.Schedule.get(session, temp_schedule["name"])
Expand Down

0 comments on commit a2fe1e0

Please sign in to comment.