Project

Profile

Help

Issue #1641

closed

unit.server.db.model.test_dispatch.TestScheduledCallSave.test_new is non-deterministic

Added by rbarlow about 8 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
High
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

This test can occasionally fail with this traceback:

Traceback (most recent call last):
  File "/usr/lib64/python2.6/unittest.py", line 278, in run
    testMethod()
  File "/home/jenkins/.virtualenvs/test/lib/python2.6/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "/home/jenkins/workspace/unittest-pulp-pr/node-type/rhel6-np/pulp/server/test/unit/server/db/model/test_dispatch.py", line 690, in test_new
    mock_insert.assert_called_once_with(expected)
  File "/home/jenkins/.virtualenvs/test/lib/python2.6/site-packages/mock.py", line 846, in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
  File "/home/jenkins/.virtualenvs/test/lib/python2.6/site-packages/mock.py", line 835, in assert_called_with
    raise AssertionError(msg)
AssertionError: Expected call: insert({'next_run': '2016-02-08T18:40:00Z', 'remaining_runs': None, 'last_updated': 1454956799.9950809, 'first_run': '2016-02-08T18:39:59Z', 'total_run_count': 0, 'schedule': 'ccelery.schedules\nschedule\np0\n(cdatetime\ntimedelta\np1\n(I0\nI60\nI0\ntp2\nRp3\nI00\nNtp4\nRp5\n.', 'principal': <MagicMock name='mock.SERIALIZER().data' id='170554256'>, 'kwargs': {'scheduled_call_id': '56b8e0ff22ff120a07b49d4c'}, 'args': [], 'enabled': True, 'last_run_at': None, 'task': 'pulp.tasks.dosomething', 'failure_threshold': None, 'resource': None, '_id': ObjectId('56b8e0ff22ff120a07b49d4c'), 'consecutive_failures': 0, 'iso_schedule': 'PT1M'})
Actual call: insert({'next_run': '2016-02-08T18:39:59Z', 'remaining_runs': None, 'last_updated': 1454956799.9950809, 'first_run': '2016-02-08T18:39:59Z', 'total_run_count': 0, 'schedule': 'ccelery.schedules\nschedule\np0\n(cdatetime\ntimedelta\np1\n(I0\nI60\nI0\ntp2\nRp3\nI00\nNtp4\nRp5\n.', 'principal': <MagicMock name='mock.SERIALIZER().data' id='170554256'>, 'kwargs': {'scheduled_call_id': '56b8e0ff22ff120a07b49d4c'}, 'args': [], 'enabled': True, 'last_run_at': None, 'task': 'pulp.tasks.dosomething', 'failure_threshold': None, 'resource': None, '_id': ObjectId('56b8e0ff22ff120a07b49d4c'), 'consecutive_failures': 0, 'iso_schedule': 'PT1M'})

Related issues

Related to Pulp - Refactor #2158: Remove pulp_celerybeat use of scheduled calls from databaseCLOSED - CURRENTRELEASEdkliban@redhat.com

Actions

Also available in: Atom PDF