coverage task fails on Jenkins

Bug #1155728 reported by Dror Kagan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Undecided
Dror Kagan

Bug Description

it seems that there are (at least) two tests, in the testr unittest framework, that call reddwarf/tests/unittests/util/util.py - init_db()
this is causing a race condition and these two tests, being run in parallel, will end up failing. the first will actually create the sqlite file and the second will fail complaining that stuff already exists in the sqlite db.

please notice that this doesn't reproduce in a dev environment on a mac.

also notice that this doesn't fail the unittests themselves, since run_tests.py runs first and already set up the sqlite file.
we can't run it in that order (run_tests.py first and testr second) for coverage, since we need to use the -a option for coverage to aggregate the coverage report, and the testr wrapper doesn't expose this option. so we run testr first, and then we run run_tests.py with the -a option.

as a temporary fix, i'll add an execution of run_tests.py in the coverage job before we actually gather coverage, so they don't fail.

however, the proper fix should be to protect the init_db() code to be safe for parallel execution.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to reddwarf (master)

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

Changed in reddwarf:
assignee: nobody → Dror Kagan (dror-kagan)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to reddwarf (master)

Reviewed: https://review.openstack.org/24547
Committed: http://github.com/stackforge/reddwarf/commit/8f388f96d5e3ffa46d9aa468578d2b154b9a3f8c
Submitter: Jenkins
Branch: master

commit 8f388f96d5e3ffa46d9aa468578d2b154b9a3f8c
Author: Dror Kagan <email address hidden>
Date: Fri Mar 15 11:20:20 2013 -0700

    fix coverage for jenkins - temp fix

    this is a temp fix for bug 1155728
    but actually fixing bug 1155729 that was opened just for this

    Change-Id: I4bae33a39fb53c733a39d28c4e742725ae1c82a4
    Fixes: bug# 1155729

Changed in reddwarf:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in trove:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: havana-2 → 2013.2
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.