Flaky tasks test glance.tests.unit.v2.test_tasks_resource.TestTasksController.test_create_with_live_time

Bug #1505675 reported by Erno Kuvaja
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Erno Kuvaja
Liberty
Fix Committed
High
Erno Kuvaja

Bug Description

We get constantly failures like:
2015-10-13 06:59:05.343 | ======================================================================
2015-10-13 06:59:05.343 | FAIL: glance.tests.unit.v2.test_tasks_resource.TestTasksController.test_create_with_live_time
2015-10-13 06:59:05.344 | tags: worker-7
2015-10-13 06:59:05.344 | ----------------------------------------------------------------------
2015-10-13 06:59:05.344 | Traceback (most recent call last):
2015-10-13 06:59:05.344 | File "/home/jenkins/workspace/gate-glance-python27/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
2015-10-13 06:59:05.344 | return func(*args, **keywargs)
2015-10-13 06:59:05.344 | File "glance/tests/unit/v2/test_tasks_resource.py", line 365, in test_create_with_live_time
2015-10-13 06:59:05.344 | self.assertEqual(CONF.task.task_time_to_live, task_live_time_hour)
2015-10-13 06:59:05.344 | File "/home/jenkins/workspace/gate-glance-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
2015-10-13 06:59:05.344 | self.assertThat(observed, matcher, message)
2015-10-13 06:59:05.344 | File "/home/jenkins/workspace/gate-glance-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
2015-10-13 06:59:05.345 | raise mismatch_error
2015-10-13 06:59:05.345 | testtools.matchers._impl.MismatchError: 48 != 47
2015-10-13 06:59:05.345 | Ran 2855 tests in 298.484s
2015-10-13 06:59:05.345 | FAILED (id=0, failures=1, skips=2)
2015-10-13 06:59:05.345 | error: testr failed (1)
2015-10-13 06:59:05.394 | ERROR: InvocationError: '/home/jenkins/workspace/gate-glance-python27/.tox/py27/bin/lockutils-wrapper python setup.py testr --slowest --testr-args='

This is caused if the second of timestamp changes between created_at and updated_at gets created.

Erno Kuvaja (jokke)
Changed in glance:
assignee: nobody → Erno Kuvaja (jokke)
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/234188

Changed in glance:
status: New → In Progress
Revision history for this message
Erno Kuvaja (jokke) wrote :

We can wait with this until the release is cut and backport it after that.

tags: added: liberty-backport-potential
Changed in glance:
milestone: none → mitaka-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/234188
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=b413db7652d6edc22e0c15922b6df1c7acc6b177
Submitter: Jenkins
Branch: master

commit b413db7652d6edc22e0c15922b6df1c7acc6b177
Author: Erno Kuvaja <email address hidden>
Date: Tue Oct 13 12:40:06 2015 +0000

    Decrease test failure if second changes during run

    test_create_with_live_time fails gating constantly. This is due to
    the logic in the test which breaks if the second changes between the
    two timestamps expires_at and updated_at are created. This change
    drops the failure rate to those occasions where we hit that second
    change also to minute change.

    Closes-Bug: #1505675

    Change-Id: I234d80388edd2a659a2374a29179ce23b23bb99a

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/235838

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/liberty)

Reviewed: https://review.openstack.org/235838
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=8902d1265952d618b91a939ce9fd27656d2d9277
Submitter: Jenkins
Branch: stable/liberty

commit 8902d1265952d618b91a939ce9fd27656d2d9277
Author: Erno Kuvaja <email address hidden>
Date: Tue Oct 13 12:40:06 2015 +0000

    Decrease test failure if second changes during run

    test_create_with_live_time fails gating constantly. This is due to
    the logic in the test which breaks if the second changes between the
    two timestamps expires_at and updated_at are created. This change
    drops the failure rate to those occasions where we hit that second
    change also to minute change.

    Closes-Bug: #1505675

    Change-Id: I234d80388edd2a659a2374a29179ce23b23bb99a
    (cherry picked from commit b413db7652d6edc22e0c15922b6df1c7acc6b177)

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/glance 12.0.0.0b1

This issue was fixed in the openstack/glance 12.0.0.0b1 development milestone.

Changed in glance:
status: Fix Committed → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/glance 11.0.1

This issue was fixed in the openstack/glance 11.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/glance 11.0.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.