Skip to content

Fixes should_sync() test so that it passes with celery v3.1.24 #512

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Sep 13, 2017
Merged

Fixes should_sync() test so that it passes with celery v3.1.24 #512

merged 1 commit into from
Sep 13, 2017

Conversation

caronc
Copy link
Contributor

@caronc caronc commented Mar 2, 2017

Was getting the following error:

nosetests /builddir/build/BUILD/django-celery-3.2.1/tests/../djcelery/tests  --cover3-package=djcelery --cover3-branch --cover3-exclude=djcelery,djcelery.tests.*,djcelery.management.*,djcelery.contrib.* --verbosity=1
Creating test database for alias 'default'...
.............................................F..........................
======================================================================
FAIL: test_should_sync (djcelery.tests.test_schedulers.test_DatabaseScheduler)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/django-celery-3.2.1/tests/../djcelery/tests/test_schedulers.py", line 159, in test_should_sync
    self.assertTrue(self.s.should_sync())
AssertionError: 0 is not true
-------------------- >> begin captured logging << --------------------
djcelery.schedulers: DEBUG: DatabaseScheduler: intial read
djcelery.schedulers: INFO: Writing entries (0)...
djcelery.schedulers: DEBUG: DatabaseScheduler: Fetching database schedule
djcelery.schedulers: DEBUG: Current schedule:
<ModelEntry: thefoo32 djcelery.unittest.add33(*[2, 2], **{u'callback': u'foo'}) <freq: 20.00 minutes>>
<ModelEntry: thefoo30 djcelery.unittest.add31(*[2, 2], **{u'callback': u'foo'}) <freq: 10.00 seconds>>
<ModelEntry: thefoo34 djcelery.unittest.add35(*[2, 2], **{u'callback': u'foo'}) <crontab: 2,4,5 * * * * (m/h/d/dM/MY)>>
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 72 tests in 0.667s

Just submitting a small patch that makes the pass correctly (without breaking it's intentions).

@auvipy auvipy merged commit ec062ff into celery:master Sep 13, 2017
maxmalysh pushed a commit to maxmalysh/django-celery that referenced this pull request Jul 29, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants