Non determinism in test_db.test_image_get_all_marker
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
High
|
justinsb |
Bug Description
The test test_image_
If the two timestamps have the same created_at timestamp (either a fast machine or a low granularity clock), then the order of the results should comes down to the order of the UUIDs. However, this test assumes that Fixture #2 always comes after Fixture #1.
An easy way to check this is to do the below (pre-compute the timestamps), and change the timedelta between 0 and 1.
t1 = datetime.
t2 = t1 + datetime.
FIXTURES = [
{'id': UUID1,
'name': 'fake image #1',
'status': 'active',
'disk_format': 'ami',
'container
'is_public': False,
'created_at': t1,
'updated_at': t1,
'deleted_at': None,
'deleted': False,
'checksum': None,
'min_disk': 0,
'min_ram': 0,
'size': 13,
'location': "swift:
'properties': {'type': 'kernel'}},
{'id': UUID2,
'name': 'fake image #2',
'status': 'active',
'disk_format': 'vhd',
'container
'is_public': True,
'created_at': t2,
'updated_at': t2,
'deleted_at': None,
'deleted': False,
'checksum': None,
'min_disk': 5,
'min_ram': 256,
'size': 19,
'location': "file:/
'properties': {}}]
With a timedelta of 0, python run_tests.py glance.
I think there's also a related bug in the == logic, I'm going to file that separately.
Changed in glance: | |
assignee: | nobody → justinsb (justin-fathomdb) |
Changed in glance: | |
milestone: | none → essex-4 |
importance: | Undecided → High |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | essex-4 → 2012.1 |
Fix proposed to branch: master /review. openstack. org/4046
Review: https:/