Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_until_time failing since 1.1.0 #488

Closed
mweinelt opened this issue Oct 10, 2021 · 3 comments
Closed

test_until_time failing since 1.1.0 #488

mweinelt opened this issue Oct 10, 2021 · 3 comments

Comments

@mweinelt
Copy link

After upgrading to 1.1.0 we see the following test fail:

======================================================================
FAIL: test_until_time (test_schedule.SchedulerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/schedule-1.1.0/test_schedule.py", line 317, in test_until_time
    self.assertRaises(ScheduleValueError, every().day.until, datetime.time(hour=5))
AssertionError: ScheduleValueError not raised by until

It was introduced in 1849e01.

@pgajdos
Copy link

pgajdos commented Mar 4, 2022

It is flaky it seems.

@nekopsykose
Copy link

given that this fails at, say, 4am localtime, and editing that hour=5 to hour=3 makes it pass instantly, and editing it back to =5 makes it consistently fail, i assume that is just setting current_date.hour, and so it is not 'in the past' as what it tries to test, and so doesn't fail as it's not invalid to schedule something just slightly in the future from localtime.

i could also be misunderstanding what it means, but based on the behaviour it seems to explain why it fails at a certain time of day

emollier added a commit to emollier/schedule that referenced this issue Feb 15, 2023
Since introduction of the "until" job scheduling method to apply
deadlines, the test suite fails at test_until_time when run between
midnight and 5am local hour.  This patch ought to ensure the deadline
is always one hour ago independently of the time of the day, or night.
This should resolve Github issue dbader#488.

Signed-off-by: Étienne Mollier <emollier@debian.org>
@SijmenHuizenga
Copy link
Collaborator

This has been resolved in #563. Thanks to everyone here for reporting and debugging! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants