Project

Profile

Help

Refactor #743

closed

unit.server.managers.schedule.test_utils.TestUpdate.test_update should not depend on wall clock timing

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

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

There is a unit test that fails periodically for me:

======================================================================
FAIL: test_update (unit.server.managers.schedule.test_utils.TestUpdate)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mock.py", line 1224, in patched
    return func(*args, **keywargs)
  File "/home/rbarlow/devel/pulp/server/test/unit/server/managers/schedule/test_utils.py", line 251, in test_update
    self.assertTrue(time.time() - last_updated < .1)
AssertionError

----------------------------------------------------------------------
Ran 1912 tests in 71.563s

FAILED (failures=1)

I've had some trouble getting this particular test to pass over a few runs. My dev box is a VM on a system with several others running right now, and this seems to lend itself to timing problems with this test.

We should refactor this test to avoid depending on wall clock time, perhaps by using freezegun or mock.


Related issues

Is duplicate of Pulp - Issue #729: Pulp tests should not rely on wall clock timeCLOSED - WONTFIXActions
Actions #1

Updated by rbarlow about 9 years ago

I've run this tests three times in a row and it has failed every time.

Actions #2

Updated by cduryee about 9 years ago

  • Related to Issue #729: Pulp tests should not rely on wall clock time added
Actions #3

Updated by cduryee about 9 years ago

  • Related to deleted (Issue #729: Pulp tests should not rely on wall clock time)
Actions #4

Updated by cduryee about 9 years ago

  • Is duplicate of Issue #729: Pulp tests should not rely on wall clock time added
Actions #5

Updated by bmbouter about 9 years ago

  • Status changed from NEW to CLOSED - DUPLICATE

I moved the contents of this to #729 which will track the resolution of this more broadly.

Actions #6

Updated by bmbouter about 9 years ago

  • Is duplicate of deleted (Issue #729: Pulp tests should not rely on wall clock time)
Actions #7

Updated by bmbouter about 9 years ago

  • Is duplicate of Issue #729: Pulp tests should not rely on wall clock time added
Actions #8

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF